Summary:
If you have gamerule doImmediateRespawn set to true you won’t instantly respawn when you are in ESC menu, but if it is set to true you should always respawn instantly after dying.
How to reproduce:
Set the gamerule doImmediateRespawn to true
Fly really high so you won’t survive when falling
Switch to survival mode
Open ESC menu before you die
Expected result: You will immediately respawn after you die
Actual result: You won’t respawn until you close the menu
Affects version 1.16.210.59 in Windows 10