These sorts of Uno Reverse Card moments are both frustrating and gratifying to me as a DM. I of course try to roll with them, but occasionally they do mean I need to toss out half my mental notes for the rest of the campaign and seat-of-my-pants a whole new plot branch right in the moment.
There was one campaign I was in, I'd estimate it lasted about five years of real time, where my character stabbed the final Big Bad of the campaign with a weapon that we had picked up in the very first adventure of the campaign. We'd been toting it around ever since then without using it because it seemed like a very special purpose item. It wasn't pivotal to defeating her but it was still fun to tie the campaign together like that.
I think its fair that if your players do something that breaks your campaign in half, to say : guys, we can do this, but if we do then I have to redoe everything I have prepared. Would it be ok if we didn't please ?
But that is also why I rarely prep more than 3 sessions in advance. The more you have prepared, the more youll be tight with player freedom or loose more.
I've been a player for a few years and a dm for a few months now.
Hearing this as a player would completely kill my immersion and turn the campaign into an arcade game in my head. If you are allowed to say this, then I am allowed to hot reload when doing something stupid because having my pc die would throw out all of the work I've put into them and their back story.
There should be consideration given to both sides of this. The campaign is, in a sense, the DM's character. In an ideal world the DM would account for everything and the players won't be able to derail it utterly, but in the real world occasionally something will slip through and I think the players should allow for this kind of whoopsie. Just like if a player who had a deep investment in a character did something that unexpectedly and pointlessly killed their character off, I would be open to giving them "backsies." As long as they were open to it.
Might be worth adding this to the session-zero discussion.
If the idea of Boromir knowing he's been killed but still fights until the very end ISN'T something you want, nobody forces you to my friend. We all have different tastes for when we'll go out.