Both of those point straight at the underlying problem: allowing turn-based combat rules to overwrite realism.
Particularly in the second example. Realistically, if a PC takes the time to make an attack of opportunity that PC is then left behind by the fleeing foe and - assuming speeds and stamina are equal - the foe can never be caught as it'll have about a five-foot lead.
The combat rules are for resolving combat and use a turn-based system for the sake of sanity. So we shouldn't be too surprised when they don't resolve other situations well. I don't know if the 5E DMG suggests when to move from combat rules to evasion rules, but it would probably be helpful to DMs if it did.
Anyway, I have been thinking a bit on codifying simple evasion rules for my Pathfinder 2E game. Evasion is 2 steps while transitioning from combat to evasion is 2 additional steps.
Moving from Combat to Evasion
1. Combatants who have reached the edge of the combat area (determined by the GM), can, on their next turn, declare to flee, leaving combat.
2. Combatants near the escape route can, on their turn, choose to pursue, also leaving combat.
Evasion
1. Pursuers make Athletics checks against the Athletics DCs of evaders they are chasing.
Pursuers can close to melee range and take an action against an evader whose DC they succeeded against. Evaders are flat-footed to pursuers.
2. Pursuers make Fortitude saves against the Fortitude DCs of evaders still able to escape.
Evaders fail to escape pursuers who succeed.
Evaders whose Fortitude DCs were not beaten escape.
Bonuses and penalties can be applied to checks depending on various factors, such as speed differences between pursuers and fleeing creatures, distance between the parties when chasing starts, or clever moves on either part. If moving through an area full of obstacles, Acrobatics might be used instead of Athletics, etc. Creatures in combat may also still be able to make ranged attacks against fleeing creatures, depending on distance and line of sight. If a pursuer takes the Grapple action or otherwise immobilizes a fleeing creature, I would start a separate combat between those two. Any other pursuers automatically catch up. You could also add in critical successes and failures - such as perhaps two actions allowed on a successful Athletics check.