Routing page 31:
If an attacking unit routs, it is removed from the ongoing battle and remains in its origin area, unless that area is already marked with one of the attacker’s routed activation markers, in which case the unit is eliminated.
Retreat page 30:
If the attacker retreats, he does not move any units from their origin areas. All of those origin areas (i.e., those that contain units that were engaged when the retreat was announced) are marked with routed activation markers as described for the defender, above.
End of battle page 30:
If battle ends and no defending units remain in the target area, the attacker may move all, some, or none of his surviving
engaged units and Heroes into the target area. Otherwise, surviving engaged units and Heroes simply remain in their respective origin or target area.
I don't think the target/origin region have to be seperated. So I think the units of the attacker stay in the region after retreat/routing (unless there is already a routed activation Marker in the area, then routing will destroy the unit!)