Based on 1.11.2 decompiled using MCP 9.35 rc1
When a legacy portal which is not at 0, 0 is used to respawn the ender dragon the portal is directly replaced with endstone. This makes the end crystals which still exist at that point be on top of endstone even though they cannot be placed on it.
The new end portal at 0, 0 is directly placed after that.
The old end portal would be replaced at the end of the respawning process when all end crystals explode. After that the new unlit end portal at 0, 0 should be created.