That is not true. Indeed, there have been many cases of memory loss during NDEs and these can be attributed to heavy medications, but also there have been the opposite cases when people have reported vivid memories and actual real time perception of events during ''brain death'' period. Even one such case is enough to prove that brain is not the originator of consciousness and that consciousness can exist independently of brain.
Results of world's largest Near Death Experiences study published
Thirty-nine per cent of patients who survived cardiac arrest and were able to undergo structured interviews described a perception of awareness, but interestingly did not have any explicit recall of events.
“This suggests more people may have mental activity initially but then lose their memories after recovery, either due to the effects of brain injury or sedative drugs on memory recall,” explained Dr Parnia, who was an Honorary Research Fellow at the University of Southampton when he started the AWARE study.
Among those who reported a perception of awareness and completed further interviews, 46 per cent experienced a broad range of mental recollections in relation to death that were not compatible with the commonly used term of NDE’s. These included fearful and persecutory experiences. Only 9 per cent had experiences compatible with NDEs and 2 per cent exhibited full awareness compatible with OBE’s with explicit recall of ‘seeing’ and ‘hearing’ events.
One case was validated and timed using auditory stimuli during cardiac arrest. Dr Parnia concluded: “This is significant, since it has often been assumed that experiences in relation to death are likely hallucinations or illusions, occurring either before the heart stops or after the heart has been successfully restarted, but not an experience corresponding with ‘real’ events when the heart isn’t beating. In this case, consciousness and awareness appeared to occur during a three-minute period when there was no heartbeat. This is paradoxical, since the brain typically ceases functioning within 20-30 seconds of the heart stopping and doesn’t resume again until the heart has been restarted. Furthermore, the detailed recollections of visual awareness in this case were consistent with verified events.
http://www.southampton.ac.uk/news/2014/10/07-worlds-largest-near-death-experiences-study.page
I personally know one person who has undergone through such experience. He told me that he was floating above his body and was fully aware of his surroundings, he remembers details of conversation between doctors, 'beeping' of instruments and doctor's attempts to revive him. He was officially dead for 3 minutes. He said that he was panic stricken (while floating above his body) and that he kept thinking: "I want to live!".