OK, thanks for this example.
This is not what I was expecting as an example of the PCs (players?) "owning" the story.
If the finding of the "exit" was pure coincidence then it seems like a more-or-less random tweak to the sequence of events.
There was one group that did it enough that I'm reluctant to say it was consistently coincidental. There was almost certainly some interaction going on between the writers of those adventures and the minds of the players. While I can't say years later whether there was intent, I do remember it being a pattern.
In a dungeon like the Caves of Chaos I think it's meant to be open to multiple ways of entering and engaging it - there is no opening that is "supposed to be the exit" - and so what you describe would seem to be the default. But that's not the sort of thing I have i mind when talking about player agency over the shared fiction.
This was in one of Paizo's Adventure Paths, and these dungeon-ish sections had clear Big Bosses. My point is that our decisions mattered, at least in deciding the order of events--in principle it might have been possible to slip out after killing the Bosses, but I remember there being at least one group (metagame) decision that that would have been long-term detrimental (earning fewer XP than expected).
I thikn the difference is that in one the player has a chance of establishing the shared fiction, and in the other that is the GM. That seems to be a difference in agency. Whether or not it's big I don't know, but I'm not sure how it can be irrelevant to a discussion about player agency over the content of the shared fiction.
I think that the player whose action resolution reveals a GM-determined fact still has agency over the content of the fiction, including their decision to attempt that action and their decisions and actions afterward. In many games (at least the ones I GM) where the GM determines facts to be revealed, the PCs choose which goal/s they are pursuing. It seems to me that you believe that if a player cannot declare facts, they have no agency over the fiction; I disagree. Having read through Blades in the Dark and Apocalypse World, I think I'd feel as though I had more agency as a player in a well-run game of D&D 5E than either, which I realize is practically heresy (and note that it's not based on actual play experience).