Train with multiple axles on a spline?

Does anyone know a solution to the spline joining problem?

If the train is moving on 1 spline everything is fine, it’s worse when it has to switch to another spline.