Issue present in singleplayer worlds and third-party servers
When players have modified health attributes and take damage, they can falsely die.
The player will see a respawn screen, despite still having health available.
The issue is only perceived client-side, players in a server environment will not see that this has happened to another player; And reloading your world, or re-logging into a server will resolve the issue.
The most reliable way to reproduce this is to set a players max health to a low value (/attribute @s minecraft:generic.max_health base set 6) and then splash the player with the poison effect (though I see this issue occur seemingly unpredictably with many other deaths, while the players health attribute is modified to a low value)
As attached (first.png), player still has available health after being splashed with poison, but they see the respawn screen as if they have died
then when they click respawn, they do not teleport to their spawn point, they do not lose their items, they just resume where they were (second.png)
if the player looks at themselves in third-person or in the inventory, their player model is flickering red and leaning on an angle, as if they are dying (third.png)
This issue seems to be caused by the players health bar not updating when the max health attribute is modified. Despite only having 3 available hearts in this scenario, the player still has 10 hearts worth of life. If the player takes any damage first (i.e. punched by another player) and is then splashed by poison, this bug will not occur, because their health is updated to their max health value after they take damage
Suggested solution: Update the players current health to match their max health value when it is modified.
To my knowledge, this bug has existed since at least 1.12, as seen here https://www.youtube.com/watch?v=yW3bkIgWHwY
MC-19690 Reducing maxHealth / max_health can cause fake death