The bug
If an ender dragon that has been already killed is constantly being teleported to a set location, then it will never go away, meaning that it will never drop experience orbs and the bossbar will never go away, as well as the exploding ender dragon.
How to reproduce
Create/open a world where the ender dragon has not been killed yet
Create a command block with the command listed at the bottom of this report, set to always active and repeat
Kill the ender dragon without using commands
Notice that the ender dragon will never go away; it will just stay in that same location forever (still with explosion particles, bossbar, and end crystal beam).
This also occurs if the ender dragon is set to teleport to its usual death point, which is unlike its regular death (if you try to teleport the dragon to a coordinate while it is dying, nothing will happen). I found that occasionally, one death ray (as I'll call it) appears, but is locked and does not disappear even if the DragonPhase NBT value is changed.
Video
Command
tp @e[type=minecraft:ender_dragon] ~ 80 ~
Linked issues
Comments 4

Can confirm, but it's somehow logical because the dragon has to go back to the bedrock something before she disappears for various reasons.
This is sort of not a bug, if you kill the ender dragon and the ender dragon is above an obsidian pillar it will not start disappearing until it reaches the bedrock portal. This is most likely intended.
I have not tested this for a few snapshots, and cannot reproduce it anymore.
Confirmed