That's why it's so important to know in advance what the route to San Francisco should look like, so that you can recognize early on if the train suddenly appears to have a different destination in mind.
If the train pulls out of the station without you, don't chase after it. Wait for it to come back and pick you up. And when you see passengers on the roof, and hanging out of the windows, you know it's near the end of the line.