So the service where you pull cement wagons with BR 155 or 185 which starts at 12:00 is broken. When you stop the train at the indicated objective after uncoupling wagons at Boele yard behind comes BR 363 which was earlier sitting at red signal and it just ram into your loco.
The class 363 - which coincidentally is trying to manoeuvre to attach itself to the cement wagons you uncoupled from earlier - will start moving at 12.23, and it will be given permission to do so whether the track is clear or not. But it's simple enough to have finished your tasks by then and moved out of its way, as long as you know you have to.
I don't think that its random at all. It happened three times I think that the problem is with the signalling system which TSW has. It would't let the BR 363 pass red signal if the one section ahead is occupied. Signal should also act according to the train priority, so should never let shunting locomotive before anything else with higher priority.
Strange, has not happened to me. Probably a timing issue, like if you are too early or too late, this happens. Try to follow these timings: https://smtimetables.herokuapp.com/train/3630 BTW I completely agree that the signals in that area especially a wonky.