I found a solution. Use one of JR's signals which one can define a path through the junction block. I set mine to F for farthest.
JR MS Rowen E 04-1,<kuid2:45324:251046:1> by norfolksouthern
AI actually worked smartly when I just tried the above. Held tight on red when another train was controlling the switch on the mainline from the yard and proceeded on green, just like clockwork, once the switch was clear ahead.
The signals on my latest test were also going yellow when they actually SHOULD as well as when the next signal ahead of it is red to allow the train to slow down to a smart speed ahead of time and eventually creep up onto the red signal like clockwork. My signals are at least a half mile apart in a 50 mph zone. Maybe closer in a 35 or 25.
Some of these work well as I have just discovered some of them make AI stupid.
Some of them, AI will actually stop the train but won't be able to change the signal color once the track is clear ahead.
Some of them just get run right through on red.
Another thing, if these signals are stuck on yellow on a main line, make sure there is a number of them along the line and place an invisible signal in between as necessary to make them go green.
AI will act stupid on some of JR's signals but act perfectly if you choose the right kuid signal it happens to like and scatter some invisible signals like breadcrumbs along the route as well.