Ender Dragon doesn't take damage when getting shot while its landing in the middle
When the Ender Dragon lands on the bedrock in the middle of the End, it will not take damage if you shoot it (so far I have only tested with arrows). But as soon as it flys away from the bedrock, you can shoot it.