Seems to be related to MC-146089
While fighting the dragon last night it's behavior was rather odd and would continuously fly in circles without attacking or landing, which I know is already an existing bug. This happened a few times during the battle, but if I was killed by falling in the void or by an Endermen, the dragon would act normally again.
I was tired of killing myself so I tried leaving and then reentering the world while I was still in the end fighting the dragon. When I left the world the dragon was about 50% health, but when I logged back in the dragon was at 100% health. All of the end crystals were already destroy so it was definitely not the crystals healing the dragon.
Attached video shows the health resetting after relogging.
Duplicate of MC-105080