The underlying issue is that legacy scanning happens every time even if a DragonFight
NBT compound already exists.
If you kill the Ender Dragon in the end and then remove all the end portal frames from the portal, then relog, you will see a new bossbar for a new Ender Dragon. You can't target it with @e as it doesn't actually exist yet, but it will spawn when you move far enough from 0 0. Basically this means that a new dragon always spawns if the frames are removed, even if you never placed the end crystals right. This limits what creative players can do in the end, as there's always a portal located (and a dragon, if the portal got removed)
How to reproduce
Open a creative world
Go to the end dimension and defeat the Ender Dragon
Break all the the end portal blocks
Break all end gateways
Exit the world and reload it
❌ You should see the Exit End Portal go back to how it was before the Ender Dragon was killed and the Ender Dragon's health bar appear at the top of the screen. Wait about a minute and the Ender Dragon will respawn.
Linked issues
is duplicated by
relates to
Attachments
Comments

The effect is OPTIONAL. He's just stating it so it defeats the dragon FASTER. It's unrelated to the bug report ticket.
Post should be reedited to be more clear 😉 :
1. Open a creative world.
2. Go to the end dimension and defeat the Ender Dragon.
3. Break all the the end portal blocks. The torches, bedrock, and dragon egg can stay.
4. Exit the world and reload it. You should see the Exit End Portal go back to how it was before the Ender Dragon was killed and the Ender Dragon's health bar appear at the top of the screen. Wait about a minute and the Ender Dragon will respawn.

The problem might be that the legacy scanning happens every time even if a DragonFight
NBT compound already exists
Confirmed for 18w44a.

MC-108896 just happened to me in 1.14.4-pre5
Do you know what is really weird? I am not affected by this. I tried to reproduce this so many times and I didn't manage to do it. This seems to be fixed for me in 1.15.1. Can you still reproduce this?

It still happens, but you also have to break all end gateways (added that to the description).
When I followed the steps to reproduce I only got the dragon health bar, not the actual dragon. I am also unable to remove that boss bar or summon a new dragon using end crystals. If the dragon is still alive then the dragon would also appear. If I try to reproduce this but I summon in an end portal block then it would behave as normal, but the dragon's health would be at full for a second.
[media]

I've ran into this issue today. The title and description of this bugreport is very unclear. I hope the mods can improve this ticket.
Improved title: Saving and re-opening the world respawns the dragon during the first fight
Affected versions: I've confirmed this for 1.15.2, 1.16 Pre-release 2
Video showing this issue: (in 1.16 Pre-release 2) https://www.youtube.com/watch?v=P0syIczLpOU
Steps to reproduce
Have an end without End Gateways (for example, a 'fresh' one the first time you enter the End)
Remove all the end crystals by punching or shooting them
Damage the dragon
Save the world
Re-open the world
The dragon will now despawn and a new full-health dragon will spawn. This also happens if you do not damage the dragon, but the effect is harder to notice then.
Confirmed for 1.16.5
Any effects outside the valid range of the effect amplifiers are considerd as invalid, see MC-10755.