Ender dragons do not lie down in the bed while sleeping. Similar to armor stands, their main hitbox is still decreased. This issue relates to MC-118058.
Reproduction steps
/time set midnight
Position a bed with its foot at coordinates 0 -60 18
/gamerule mobGriefing false
/summon minecraft:ender_dragon ~ ~ ~ {SleepingX:-1,SleepingY:-60,SleepingZ:18}
(You have the flexibility to modify the command coordinates if you've positioned the bed elsewhere.)
Press F3+B
Observed: The ender dragon does not lie down but retains a smaller main hitbox. (MC-148559 and MC-10919) Sleeping entities are typically rotated by 90°, but this behavior does not apply to the ender dragon in this case.
Expected: The ender dragon would lie down on the bed as well.
I abide by Minecraft's community standards and prohibit the transfer of ownership of this bug report to others. I intend to retain possession of the bug report at all times. Additionally, I should not be banned because I will continue to find more bugs and report them. Being banned would prevent me from reporting them.
Linked issues
Attachments
Comments 2

Keeping this separate would be preferable. Concerning the ender dragon, the underlying issue might relate to WF, as observed in MC-118058. Ender dragons, armor stands, squids, and glow squids do not undergo rotational movement during their death animation, nor do they when in a sleeping state. Furthermore, these entities do not invert when given the names Dinnerbone or Grumm. Given the triage status of MC-115092, Mojang likely aims to address the matter of armor stands, squids, and glow squids not lying down when asleep. However, since MC-118058 is designated as WF, it's unlikely that they'll prioritize resolving the issue for the ender dragon unless MC-118058 is reopened.
Forward-resolving this to MC-269775.