Buddhists have long recognised this phenomenon. The explanation offered is limited, but may be of interest to fellow seekers-after-truth.
Depending on how 'attached' the mind (the individual) is to living - and that in most cases is VERY - the still active mind, at the point of the body's 'death', seeks another resting place. This leads to the notion of rebirth, as fortunate minds might find themselves in the unformed mind of a foetus in an adjacent womb, and live another life. Less fortunate minds might find (or reject) berths in other adjacent lifeforms, at all sorts of stages on the tree of evolution.
It is claimed that the Enlightened Ones (Buddhas) are able to either turn aside from this grasping, this attachment, at the point of death, thus achieving Nirvana, or release from the repeated cycle of living and dying; or, they are able to choose the path their liberated minds take, and pick an appropriate foetus for their rebirth.
As you will see, there is some confusion over the precise nature of such death experiences, mainly because (as usual) few return to report on it...
BB