The ninth prince was the first to vanish from the ballroom. As soon as the shadow of his partner faded away in a cintillating cloud of dissolving magic, so he did. His brothers went on dancing though, each embracing his own shadow partner as loud music filled the environment.
The princesses were gone for good, unable to escape the king's domains anymore after their plot got uncovered. But the effects of their spell, the one that started as a silly game during a tedious evening and eventually became their bridge to a world of joy and freedom, lived on. Their memories and longing for a return to the castle kept them magically linked to the place where they'd been so happy. And that was why the princes still could dance with them, night after night.
Resigned to their fate, the eleventh, fourth and seventh princesses eventually relinquished their dreams of returning to the ballroom, much like their ninth sister had first done. Therefore, their shadows dissolved, and their corresponding partners soon vanished. The music wasn't so loud anymore.
As the months and years passed, more princesses let go of their longings, and more princes vanished from the ballroom. The soft music left was out of tune.
The eldest princess had been the first to get married, but the last to dettach herself from her yearnings. As the last remaining strings of her attachment broke, the final musical notes faded out. And the eldest prince vanished from the castle, reuniting with his brothers.
With the spell extinguished, the princes lost interest in revisiting the castle they had inhabited centuries before the magical summoning of their souls. But they would merrily dance with the princesses again if one day, after departing the living world, the twelve sisters sought their company once more.