I can perform melee attacks on the Ender Dragon while riding it, unlike with other mobs.
How to reproduce:
Head to the End dimension
Execute
/ride @s mount @n[type=minecraft:ender_dragon]
Attempt to hit it
Expected result:
You would be unable to attack the dragon while riding it, because it is your mount.
Observed result:
You can attack the ender dragon
Linked issues
Attachments
Comments

Also relates to MC-19163.