This bug is still an occurring issue as of 1.17.34, in this comment I put the same damage_sensor bug on a player, it triggers when the player is hurt by another when on 3-4 hearts
Steps to Repoduce:
Wear full diamond armor
Get the attacker to use diamond sword
Make the attacker hit the you while you are on 3-4 hearts
Expected results:
The event will only trigger when you are killed
Observed results:
The event triggers every time you get hit while on 3-4 hearts
This is still an issue as of 1.17.11
Updated, still affects the current version of minecraft