Use a release crossover to allow the locomotive to run around its train. A tank locomotive can do this and couple up to the other end of the train to make the return journey bunker-first. In such cases, you can use the driver command "Run Around Train" to do this automatically but I would advise putting down an invisible speed sign of about 5mph on the release spur to prevent the locomotive running through the stops.
Tender locomotives would never make the return journey tender-first so they would use the release crossover to get to a turntable road so that they could set back onto their train and make the return journey chimney-first.
Tender locomotives would never make the return journey tender-first so they would use the release crossover to get to a turntable road so that they could set back onto their train and make the return journey chimney-first.