When you die in a dream, you wake up here
It's hard to understand that dreams are you in other realities and the dream you had was a brief life in that reality because it seems like only sci fi does alternate realties but think about this... Mini thread...
A memory is an event you had, you remember you had it. All memories you have are in physical reality.
So when you dream what is that? It's a memory. Lol. You remember it. But it didn't happen in real life.
So where did the memory of the dream take place?
In the dimension you were in when you were dreaming!
That dimension in question is the astral realm.
It's alot like physical reality, just lighter in terms of gravity...in fact it doesn't really exist there at all lol. It's why when you fall it seems to take ages loool. When you die there, you come back here in the form of waking up.
I guess this is also a good time to point out the phrase sleep is the cousin of death because when you sleep you go to the upper realms temporarily and when you die you go there permanently.
Either or It's better to think of it like this, a dream is a memory that originated from/in another (astral) dimension.

.
It's so interesting how if you die in a dream you suddenly wake up cos if that's the case then when you die in real life you wake up elsewhere in another reality.
I guess hence the phrase life is but a dream...
Just to add to this, if when you die in a dream, the alternate version of you actually died so you wake up here, what do you think happens when you really die here?
The alternate version of you wakes from their dream, which was your life up until you died.