Dying ender dragons are excluded from @e. This should not be the case, because dying ender dragons are still entities.
Steps to reproduce:
1.
/summon EnderDragon ~ ~ ~ {HealF:0}/summon EnderDragon ~ ~ ~ {HealF:0}2.
/say @e[type=EnderDragon]/say @e[type=EnderDragon]
Dead entities are not selectable in general. They should be considered as being removed from the world the moment they die.