Not exactly.
He resigned his commission rather than wage war against his State and family.
He was then faced with a dilemma of whether to serve his State, which was faced with invasion.
To my mind, Lee’s choice was every bit as honorable as that of George Thomas, who chose to remain loyal to the Union when faced with the identical dilemma. Each was faced with a conflict of loyalties, where “treason” against one or the other of those loyalties could be avoided only by refusing to fight for either side.
It seems likely that some of those faced with such a choice made it for less than fully honorable reasons, but I believe Thomas and Lee acted with complete honor.