This bug occurs when a double ended train ties to stop at a station with two physical trains stations. Let me explain.
My train (1-4-1) travels from A-B-C-B-A the train can find its way to A and C and return without issues, however at B the train becomes stuck. I think this is because of the station structure, basically it is a station, then 4 platforms, then another station with the same name facing the other direction, this allows the train to get to B from A or C.
However once at that stop, the train is unable to leave, and instead just reverses until the locomotive at the back is at its own station B, this cycle of reversing, stopping, and reversing again continues indefinitely and changing the names of the two stations to something different has no effect even if the names are different. Splitting the station does work as a temporary fix but looks messy.
at the moment I am only transporting myself but in future I intend to do something similar for cargo so it would be great if there is a fix or solution for this issue.