Yeah, I always beat games before going to the trainer to mess around.
The other random quirk with the invincibility option on trainer appears to happen with timed units. Any units that have a timer don't expire. This includes the Betty turrets in the Nydus Canal path, the armored warbot in the secret mission, and the auto turrets for Ravens.
When the timer expires, they stay and remain completely functional.