I would disagree:
The direction of the retreat may be less clear if the
unit is fighting enemy from several directions at the
same time. In this case, the unit retreats from the
greatest number of touching enemy stands (front,
side or rear – corners are ignored). If this is equal, the
retreating player can nominate which of the possible
directions it will retreat. See Diagram 44.4.
In a few cases, a unit’s formation may be arranged so
that the direction of the retreat is in doubt. In this
case, identify the retreating stand touching the most
enemy and work out the unit’s retreat relative to that,
as shown in Diagram 45.1. If all stands face the same
number of enemy, the player can decide which to use.
You have to retreat form the enemy which has the most actually touching stands, so it means after removing casualities.