It is not that she has planned to die.
It is that she has planned, and she remembers well the way her own Master treated her, his loyal lapdog, the girl he plucked from her common life and declared his equal. She'd planned then, too, and she'd ripped out his throat the moment she got a chance.
She doesn't think Vader has all that many plans. She ensured that, as Darth Sidious. She broke her apprentice, more thoroughly than Darth Plagueis broke her.
That doesn't mean the Emperor's attack dog can't perceive a bared throat as well as any dog.
The exact moment of Vader's betrayal is... Inconvenient. Enraging, at least, which helps her push through the Sith sorcery she'd prepared for this event.
Rebuilding her Empire will be obnoxious, since she won't be able to work that quickly... But perhaps she can now finally wipe out the last desperate vestiges of chaotic hope in the galaxy...