The BBC has posted an article about a research team that accidentally recorded the brain waves of a person as they were dying.
One researcher is resembling these recorded wave patterns to when events memories are being recalled, which suggests a possible “revisiting of life history” at the moment of death.
Here is the link to the article: https://www.bbc.co.uk/news/world-us-canada-60495730
Another article from 2013 with some background info: https://www.bbc.com/news/science-environment-23672150