You’re asking the wrong question.
The question is, had Virginia seceded rather than take part in the Mexican War, and the US President decided to invade to force the state back into the Union, would Lee have resigned and gone home?
I think the answer is yes.
Also, resigning one's commission and not fighting and resigning to take on a commission from another army that could and would fight against the army that you were in are two very different things.
People wouldn't object so much if Lee had left the army and sat out the war. Plenty of the Southerners who stayed in the US Army didn't see action in the War, but were given other assignments in the West or at West Point.