by Anduin
actually the retreat is not simultaneous. While the defending units have to retreat during combat (precisely step 7 c, Resolution-Retreat), the attacking (winning) units are placed back into the region one step later (step 7 d). After that they have the opportunity to retreat if they exceed the 8-units-per-region-rule, as the only exception.So, (based on your example) the defending units retreat first, then the attacking.
But make sure, you play the retreat rules correctly! The defending units have first to make sure that they retreat into an adjacent FRIENDLY area. And ONLY if there is NO adjacent friendly area, they are allowed to retreat into an empty one.
The same goes for the attacker. I can only imagine really rare situations in that there is one adjacent empty area and all other regions around the battle area are occupied by neutrals/other factions or are blocked by borders...