Use a track marker on the branch you want to deviate to. This can be added in a session or to the route.
In making the AI session, use the trainz rule "Drive via", or "Navigate via" and add the track mark.
Helps to name the mark something logical in relation to your train pathing.
Rico