Parts of the Ender Dragon are immune to damage or only take damage from close range. The wings and the underside of the rear of the dragon immune to damage, and the part of the til closest to the body only takes damage on the top if you are right up against it. I discovered this when I fought the Dragon in my world for the first time. I tested this in multiple versions as well as without Optifine and the bug persists.
Steps to Reproduce
1. Enter the End
2. Use a command block to hold the Dragon in place in the air
3. Turn on hit boxes (F3 + B) and punch the various green hit boxes of the Dragon
Video: https://www.mediafire.com/file/eqwwuyzmdxs52ey/IMG_3020.MOV/file
(File too large to attach directly)
(Apologies for the video quality)
Related issues
Comments


Can confirm for 1.14.3
When the dragon attacks most of the times misses the player because is too above or too below the player

Can still confirm as 1.15.1
Forward-resolved towards MC-158205, that ticket has more votes and is already confirmed.
Tested and Comfirmed for 1.14.4 Pre-Release 5