There are a few approaches depending on how complex one wants it to be (I let someone else discuss skill challenges). The obvious approach for Pathfinder 2e is to take the chase subsystem
and bolt it on as an option during combat. If one side wants to escape, they need to separate and declare their escape. At that point, you switch to using the chase subsystem until the escapees either makes a break or their pursuers catch them.
To be honest, I don’t want escape to involve a ton of checks or play. I feel like it would eventually get rote and tedious, or it would not happen often enough that it would feel clunky in practice as I got (re)accustomed to using it. I’m also not big on player-facing clocks, which I had one of m players notice when I used the VP subsystem for something else (he runs Scum and Villainy).
What I have in my Worlds Without Number game is a mix of WWN’s procedure and B/X, mostly B/X. You can see the B/X escape procedure
on the Old-School Essentials SRD. The changes I make for WWN are to have each side make opposing Dex/Exert checks using the best modifiers for each side, and each side gets bonuses and penalties: for being slower (−2), having a smaller group (+1), dropping bait (+1 per, as appropriate), or creating obstacles (may cause the pursuit to stop). Note that WWN uses 2d6 for skill rolls, so the numbers are smaller.
To adapt that back to PF2, I’d change the check to a group
Athletics vs. the opposition’s best Athletics DC. Success means you get away, but the GM decides to where. Critical success means the players get a say where. Failure means you get caught, and combat starts again so where along the escape route. There would also be modifiers: for being slower (−4 circumstance penalty), for having a smaller group (+2 circumstance bonus), and dropping bait (−2 penalty to the DC). It’s totally untested in PF2, so I have no idea how well it would work.
The penalty for slowness seems harsh, but you only need one success on the group check to escape (wish PF2 had better group check
mechanics …). One could have only the best person roll, but having everyone roll seems more idiomatic to Pathfinder.