The Ender Dragon can only be hit with a sword in the front section of the body hitbox (closest to the neck and head).
When a sharpness sword connects with the back part of the body, the enchanted particles still fly out, but the dragon takes no damage.
The attached screenshot shows a player in creative mode swinging a sharpness netherite sword at the back part of the dragon's body. She takes no damage in the process, but the enchanted particles are visible.
This is most noticeable when the dragon enters the phase where it sits on the end portal pillar and spews breath onto the ground.
Projectiles can still hit the entire body as intended.
Linked issues
duplicates 1
Attachments
Comments 3
Seems like this has already been reported before – resolved as a duplicate of MC-158205
This is a very annoying bug, I first noticed it in 1.14. Why is nobody talking about this?