I think if you did wish to have such a rule, the simplest way to have it work is at the beginning of any follow up combat round, any defending unit may forgo any attacks and elect to retreat; they will still suffer attacks and casualties for that final round. During non-combat they then move to an adjacent friendly territory, if there are none, they are eliminated.
This makes it so that retreating isn’t free; there has to be some downside to it.