All this datapack does is check every 5 seconds if there are invulnerable crystals in the end and if the ender dragon is spawned in and not in its defeat ""cutscene"" where it flies to the middle of the island.
If that's true, it runs a command that removes invulnerability from the crystals.