The Ender Crystal beam is going the other way
The new "BeamTarget" added in the recent snapshot, applied for the EnderCrystal, beams the opposite way compared to when beaming and regenerating the Dragon. In the Screenshot, the target coordinate is set to the villager's coordinate, and after spawning the Endercrystal by
/summon EnderCrystal ~ ~ ~ {BeamTarget:{X:x,Y:y,Z:z}}
the Dragon was spawned by
/summon EnderDragon ~ ~ ~ {NoAI:1b}