The death of magic, and Star and Marco being cut off from each other in their own worlds with no way of passing the dimensional barriers, was Janna's "post-endgame, after the divorce" opportunity. Because she was well aware at that moment that Star was finally out of the picture, and she finally had a shot at winning Marco over.
But then she realized that she can never be Star, and whatever hope she had left was crushed by the portal in the sky. This was her one shot, and she could have and WOULD HAVE won, if Star and Marco didn't already create that portal beforehand and assert that they belong with each other with one last magical spell.
Dimensions were cleaved together just to ensure that Starco will happen, that is what killed Manna. Nothing, and I mean NOTHING, can stand in the way of Starco. And anything and anyone that dares to stand in the way of Starco... will suffer.
Janna understood all of this as soon as she saw the portal, so she gave up and died with her ship.