To me, this comes back to questions about the role of the players in the game. 5e D&D doesn't have a whole lot of mechanics for "Ocean's 11"-ing a situation beyond figuring out what the GM has in mind and then doing that.There’s some context you may be overlooking (or perhaps concluding isn’t important). The situation was a party boat, loaded with civilians/normies, and a check-your-weapons-at-the-door kickoff. The overwhelming signal here was “this isn’t gonna be a fight scene. Ocean’s 11 this beeotch.” So the players aren’t blameless bulls in china shops here. They have agency and they arguably drew down way too early.
Eg if a player declares I look in place X to find the widget that we need to do that other thing in place Z there is no canonical resolution framework beyond the GM looks at his/her notes to see what they say about place X. And if the players do succeed in having their PCs fing the widget, then unless the widget is a magic item or spell component there is no canonical way for working out whether deploying it at place Z to try and do that other thing wil work, beyond The GM consults his/her notes and/or makes a decision.
Given that, I think the responsibility falls heavily on the referee. There are many other things that can happen besides armed guards turning up.
I should add, I'm not faulting the GM in the OP here. There's nothing wrong with having the guards turn up! It's just that, when a GM makes that decision, it then seems to me pretty pointless to complain - in the context of a D&D game - that lethal combat was the outcome.