Hang on, I got house rules for that... slightly Dungeon World-esque
Retreat
When the party chooses to retreat from danger, at any point on a player’s turn they make a group initiative check versus the passive initiative of their foes. A PC who is unable to move does not roll. A PC who is encumbered, carrying another PC, or slowed suffers disadvantage on the roll (i.e. they cannot escape unless group, I dunno, stuffs them in a bag of holding). A PC who had an escape plan in advance or who took action during the scene to facilitate escape gains advantage. Same goes for the monsters/NPCs.
If half or more of the PCs succeed, they escape. Otherwise, the scene continues and escape is no longer an option unless circumstances change. However, if they escape, for each PC who failed the check, the party must pick one:
• The party has been split up, and possibly lost.
• The party abandons the treasure or loses a significant item.
• Each PC takes damage equal to a single opportunity atack from the monsters/NPCs.
• Even if the monsters/NPCs could not, or chose not to, immediately pursue, they’re out there looking for the party.
• The party lands in some new sort of trouble