You tell me? I asked you how you do it?
It depends on the system.
Does it use task resolution? Some sort of conflict resolution? Whole-of-scene resolution?
What sorts of action declarations does it permit? Is there a mechanic, analogous to Circles in Burning Wheel, that permits a player to make a check to see if a desired NPC turns up? Does the system permit the GM to decide in advance that an influence check can't work in a particular situation, or against a particular NPC?
Marvel Heroic RP, Apocalypse World, Burning Wheel and Classic Traveller are all pretty different systems. But I think any of them has scope to have
being taken prisoner as a result of failure (the details would be different, depending on system) and none of them makes it impossible or even hard for players of imprisoned PCs to declare actions that might have meaningful effects, including the possibility of freedom.
The last time I remember PCs being taken prisoner was in my Classic Traveller game - details
here.
EDIT: There was also arrest, imprisonment and escape in a Wuthering Heights one shot - details
here.
ANOTHER EDIT: Neither episode of capture was pre-planned. Neither involved any suspension of agency for the players, either in the lead-up to the capture or once it took place. They illustrate why I don't really agree with your OP remark:
I do wonder sometimes about using these literary tropes in play though. My take has always been that if any of the above examples are to happen, its at the very beginning of the adventure.
Neither of these episodes of capture took place at the very beginning. Neither caused any problems for game play.