I did something similar once (granted, nowhere near as COOL as your jump/detach trick), where only the engine continued to the end, but I also didn't win. I'm guessing the game requires the entire train to cross, not just the engine (probably because people like you and me using tricks were beating the game too easily).
Very cool trick man, very cool 🙂