The name of the advancement trigger player_hurt_entity suggests that it is triggered when the player damages any entity. Instead it is only triggered when the player hurts a mob.
- Download the attached advancement entity_hurt.json and place it in the following directory of your world folder
- Load the world
- Hit for example an armor stand or a boat
→ The advancement is not made
- Hit for example a pig
→ The advancement is made