The problem you have is that you do not want to break a player agency, but you want to continue to live a fun adventure. I have some experiences with this problem myself.
The solution that I found that works is to tell the player that I do not think it's a good match for my table and ask him to leave the game. I did it twice. Both times we played the rest of the adventure and the other players thanked me afterwards.
Here's another thing I've planned to do but have not tried yet: let it succeed and summon Parallel Worlds for the game to continue.
"Victory! It took a lot of trouble, but you ignored all the warnings, killed all the guards and released all the seals." The Apocalypse is released on the world!
(It kills you first, of course.)
We can imagine an observer, above the planet, observing the horror you have triggered. There is no visible blast wave, no blast. There is just one circle in which the earth has become gray. There is no light, no life, no color, no movement; everything is dead The circle is developing to engulf the whole planet.
Congratulations! You have finished the world!
So, here's the next question: how are we going to continue playing the game?
As you know, there is not one Earth, there is a large number of Parallel Lands.
There is a land where magic does not exist; there is an Earth where you are all wizards. There is an Earth where you are all ponies. And, in particular, there is a Earth that looks like our current game, except that Bob's character never existed, so he never destroyed the planet.
And we will continue our adventure by focusing on this Earth.
Thank you for playing with us, Bob!
Now. What are you doing the rest?