@e will not select players who have died and are on the death screen, but @a can.
How to test:
Place the command block and loop:
/say @a:@e
You can see output in the chat:
player:player
Then run:
/kill @s
Stay on the death interface and you can see the chat displayed:
player:
Environment
Minecraft 1.21.8, Java 21, Windows 11 Pro
This is probably intended, because @e selects all entities and if the player dies, then the player entity will die, but the player is still there, so @a can still select players on the death screen.