From: Grapevine, TX
In my observation... Subs/ships/aircraft will plot a course to a randomly selected point in the patrol box. They'll move to that point, at Transit speed while the outside the area, at Patrol speed once they're inside the area. Upon reaching that point, they plot a new course to another point inside the area.
If the patrol area is moving (relative ref pts), then the unit could find itself outside the patrol box. This could happen because the referenced unit changed course, or simply because that unit continued far enough along the same path. From what I've seen, the patrolling unit doesn't immediately recalculate and set a new course, they continue along the existing path to the existing waypoint. However, they will speed up to transit speed. Upon reaching that point, a new waypoint is set inside the zone (wherever the zone has moved). The unit will move to the new point, just like before... Transit until reaching the patrol box, Patrol speed once it's inside.
From what I've seen, this generally works very well. There's often a short delay between the base unit's course change and the patrol correcting, but I've never seen a case where it made any tactical difference.