In ETW a unit that is instructed by the player to attack in melee mode regardless of its stance will not pursue that enemy unit if that enemy unit routs, it makes no difference if you have guard mode on or off.
If a ranged unit attacks it will pursue that enemy unit even if that enemy unit routs, it makes no difference if guard mode is on or off.
In RTW1 a ranged unit that is in guard mode and is ordered to make a ranged attack will not pursue that enemy unit if that enemy unit routs it will only do so if you have guard mode off.
Just tested this, I am not sure about MTW2