When a player dies, any ender pearl of theirs that exists immediately despawn. However, if the gamerule 'doImmediateRespawn' is set to true, this doesn't happen.
You can see a showcase of this glitch on the reddit post I made: https://www.reddit.com/r/Minecraft/comments/iij7gs/a_players_ender_pearl_does_not_disappear_upon/
The reason I'm fairly certain this is a bug is because the Ender Pearl behaves in a very glitchy manner when the player respawns immediately. You can see it glitching back in forth between different positions when 'doImmediateRespawn' is true.
Duplicate of MC-177223