I've had it happen a few times. Note that Units by themselves aren't allowed to retreat. Only when they are stacked with Heroes and Sovereigns.
Also, one time my Sov left before some other units, and they ended up getting cornered/waxed off because they weren't allowed to leave the map at that point. That was a few patches ago, dunno if that still applies.