I was In a creative mode map that i use to test resource packs. I made an end portal in it, and entered The End, and tried to kill the Ender Dragon to be able to go back to the Overworld. I used the /kill @e command, but the ender dragon glitched and is now stuck on the death animation. I tried to spawn another one and kill it again, but the same thing happened to the second one
You can do /setblock ~~~ end_portal in the the end to leave if you are still stuck