You can adjust the junction trigger radius in Surveyor 1 using
this method;
It doesn't stop it locking completely (for reasons mentioned by Martinvk above) but you can set it to be much smaller than the default 20m, so that it won't lock until the train is much closer.
I often set the radius to 1m in tight areas with short clearances
Hope this helps.
Cheers,
Piere..