Retreat has been hard to work into D&D and games like it. In 1e there were rules for 'Pursuit & Evasion of Pursuit,' but they really weren't a lot more than comparing movement rates. Sufficient magic - flight or teleportation or etherealness - was always an option, but rarely for a whole party. In 4e the DM could construct a skill challenge to escape or evade a too-powerful foe, but you'd usually want to do that ahead of time, until the RC version, SCs were tricky.
13th Age probably did the best retreat option I've seen: very simply, the players can choose to retreat, but they take a 'campaign loss,' something bad happens because of their failure. It's profoundly story-oriented, which may not be right for many 5e campaigns, but it's pretty good.
Ha, yeah, not sure exactly how "liking it" goes, but I do think retreat can work fine within the 5e combat mechanics, not to mention the fact that it also lends itself to non-combat mechanics. You don't need a "skill challenge" to handle action adjudication.
Usually, if PCs are willing to surrender the primary objective of a fight to monsters or NPCs, they've already won half the retreating battle. Sometimes, it really can be that simple.
But, if monsters are interested in pursuit, you can always make a fighting retreat. Any characters not already engaged in melee can withdraw up to their movement speed while firing at pursuers. Melee combatants who are not completely surrounded and can handle another few hits can take their chances on opportunity attacks, and either attack and withdraw, or double dash. Melee combatants low on hp are stuck disengaging and withdrawing, not allowing them to put any distance between them and pursuers, but, as long as those ranged characters are helping to cover the retreat, pursuers can still be killed or dissuaded. If there is any sort of choke point or corridor, obstacles and hazards can be strewn behind. The rogue can ready an action to scatter caltrops, ball bearings or a flask of oil once the last PC passes, and then still dash away with cunning action. Control spells can be cast immediately behind the fleeing party, creating difficult terrain, obscured terrain, hazardous terrain, etc. All of this is sticking to actions that are very clearly covered in the rules, without having to adjudicate any improvised actions on the fly.
Now, if a PC is already unconscious, things do get a lot harder. This is one of the challenges that we face in my game a lot — the party doesn't realize they are outclassed until somebody gets knocked out, at which point, if healing spells are not available, they are stuck trying to drag a character away. I still think a determined party could figure out how to extricate a fallen comrade from a combat without ever resorting to any pesky role-playing, but that is certainly harder than just holding your ground and grinding it out. (After all, the DM isn't really going to let a TPK happen, will he?)
In my opinion, the things that most get in the way of retreat are:
* People are stubborn and hate admitting defeat
* Retreat requires a major strategic and tactical shift as the players and their characters adopt all new objectives
* When playing on a battlemat, there is a bit of a subconscious instinct to "stay in bounds". "You're off the battlemat, you got away", doesn't always feel believable to players or DM. Players know exactly what is detailed on their 30x30 grid, but have only vague imaginations of whatever lies beyond it, so it's harder to visualize and articulate a strategy for retreat.