Well I guess you let the dice dictate the outcome of the story beat. Nothing wrong with that.
Here's some general theorising about how plots work themselves out. Hopefully I'll be able to pull it back around to your particular conundrum. Hopefully.
When we work out adventure plots we all of us come up with story beats in our head. They might be quite broad. "This will most likely be a fight." "This will most likely be a chase." They might be more specific. "This will be an RP heavy session with a lot of Bureaucracy checks and a potential deal with a mob boss." Maybe even "a deal with a mob boss they can't refuse."
How much we then commit to those story beats once the game is in play varies a lot. Some GMs really embrace the railroad. That is to say, the story beat, and its implied forward trajectory on the plot, takes priority. Others embrace letting the story emerge from the play, letting the dice fall as they will. Most of us, I suspect, vary in what we decide and how we decide it.
I believe such decisions are informed by the lead up to any given beat. They're also informed by other things such as a general play style, game rules, campaign set up, personal preference, and many other things I'm sure. But I want to to focus on the lead up to the story beat.
The lead up in the narrative can set things up in a way that we find ourselves committed to a given solution: plot or dice. For example, if the players have been particularly clever it seems harsh to not let them succeed, or conversely, if they've been particularly dense letting them do anything other than fail seems like giving them success on a platter. Either way, if we base our decision on one of those points, we have chosen plot. If the player's actions fall somewhere in between brilliant and ridiculous we may let the dice decide.
To put it another way (because I just thought of this and I like the sound of the phrase): How much diegetic momentum does a particular story beat have at the moment of its resolution? Because if a particular beat has a naughty word tonne of momentum doing anything other than the expected leads to some real dissonance in the fiction. (cf.: the end of
Game of Thrones.) We may choose plot over dice so as to avoid this dissonance. If there's not a great deal of momentum we may feel that we don't have the right to make a decision over how it goes, so we choose dice over plot.
Then there's the meta- elements that come out of the build up to a story beat. Are people getting bored? Do they want some action? How long since we last had a combat? Does the ship weapons character need a chance to fire some ship's weapons? Do we owe our players some dice rolling? Do we owe our players some RP?
So... is it possible that you feel the outcome was unsatisfactory because the narrative was pointing one way but you found yourself going another? Because of reasons.