People do find God in foxholes, as I have witnessed.
But they rarely have time to study religion as well. Afterlife and other religious beliefs are a product of religion and not a belief in God. People faced with death make judgments about themselves and believe they will be judged. They find God to aid them in that effort, religious beliefs do not need to be included.
I have been a God fearing man for most all of my life, yet I do not believe in any afterlife, as do religious people. Never bought into the idea as it is taught.
I really do not think you are grasping the what is going on here.
But, I really don't care much.