Players killed the BBEG of my 5-year campaign too early, how can I end the campaign on a satisfying note without invalidating their victory?

My players are coming up on the end of a 5-year long campaign and they were about to fight the BBEG, an ancient blue dragon witch bent on ascending to godhood. They needed to kill a few of her allies before taking her on in her lair and prevent the completion of her ritual. After the last session in which they defeated the second to last ally of the BBEG, the BBEG decided to take matters into her own hands and disrupt their plans, splitting them up by plane shifting them to random planes of existence. However, the players each had ways to circumvent this setback and managed to reconvene and engage her in combat (I fully accept this was a mistake I should have foreseen.) I had her attempt to escape but the players were able to defeat her in combat by using all of their abilities and magic items extremely effectively and by coordinating against her attacks and spells.

At the end of the session I asked the players if it was a satisfying conclusion to the BBEG and campaign, and while they said yes they were somewhat unenthusiastic in their responses. I personally felt extremely upset by this chain of events as I had planned for the final battle in her lair to tie up several loose plot threads and give the players an epic end to the campaign, and I feel I’ve written myself into a corner. She has several powerful allies the players never defeated who could revive her and I could have the campaign end the way I intended but I worry that will rob them of their victory. I intend on rewarding them with epic boons for defeating her but I feel that’s not enough to offset her returning. Should I have them learn of the plot to revive the BBEG and complete her ritual to ascend to godhood and give them the chance to prevent that as the final fight, or should I just take the consequences of my actions on the chin and learn from this?