On my Monaco coach, if the generator is started when hooked up to shore power, the transfer switch will shift to generator power as soon as the generator gets up to speed. No damage done at all.
During hot weather where I am running the AC with the generator while going down the highway, I can keep it running while I hook up to shore power, and then shut the generator down. A very short delay and then it switches to shore power.
I also have the Energy Management System that prevents electrical problems that others may have with their generator/shore power.