Does your loop have 2 1015K units (or a K and a T unit)? And placed near the switch.
If not then this is your problem.
And while in the loop in DC, you need to reverse the main line polarity if you do not want to stop the train and reverse the polarity in the loop.
Please advise
Get the Garden Railways newsletter delivered to your inbox twice a month