Spoiler: it does not
Also there are different types of “ego”.
While the ego that is based on the physical limbic brain and that is responsible for physical survival may vanish with the death of the physical body, the ego that makes up your individuality and personality does not.
Also, also, as I tried to explain to you for many times in the past, none of these types of ego or personality and individuality is the actual you. You are consciousness and everything else is a tool for it. Most people on the planet identify with their role on purpose per game design and because your Higher Self wanted to experience it this way.
As immortal eternal consciousness you are free to use any and all possible types of filters, roles, personality setups, individuality setups, egos etc. through which you want to experience reality.
If you don’t believe me, read Dreamweaver’s post: