I opened my game to Lan and I had exited the game afterwards because I had done so on accident, then when I came back, the ender dragon was back to full health after only having 75% health left. There were no ender crystals left in the end so I'm not sure what happened.
Duplicate of MC-105080, which has been fixed in 21w19a.