Since a few hundred thousand US soldiers died back then fighting the army commanded by Robert E. Lee, it’s hard to make any case that seeing him as an enemy of the United States is “judging him by the standards of today”.
FWIW I agree with you. He violated his oath as an officer.
That oath was adopted in 1789 and had two parts:
"I,_____, do solemnly swear or affirm (as the case may be) that I will support the constitution of the United States."
The second part read:
"I,_____, do solemnly swear or affirm (as the case may be) to bear true allegiance to the United States of America, and to serve them honestly and faithfully, against all their enemies or opposers whatsoever, and to observe and obey the orders of the President of the United States of America, and the orders of the officers appointed over me."
That would have been the oath Lee took when he entered the US Army in 1829.
In 1830 the oath was changed to this:
I, _____, appointed a _____ in the Army of the United States, do solemnly swear, or affirm, that I will bear true allegiance to the United States of America, and that I will serve them honestly and faithfully against all their enemies or opposers whatsoever, and observe and obey the orders of the President of the United States, and the orders of the officers appointed over me, according to the rules and articles for the government of the Armies of the United States."
I’m not aware of whether serving officers were required to swear the new oath or not.
With 32 years of service in the US Army when he left to join the confederate army, Lee clearly violated his oath. I could have accepted Lee resigning and refusing to fight against Virginia or refusing a senior command on the grounds that he would not raise a hand against his home state.
But that is not a route he chose. Instead he chose to fight against a nation he swore to defend, citing loyalty to his home state of Virginia. None of that suggests Lee made the correct decision.
Lee had a bad habit of not wanting to offend or disagree with others, and while that probably made him a beloved general, it is none the less not a desirable trait in a senior officer. Lee often didn’t act like one.
It’s true that a large number of serving officers and enlisted men left the Union army to fight for the confederacy, but as you point out few senior officers made the same choice. Not to get political, but we did see a similar split in senior versus junior officer positions around the most recent peaceful transition in power. Senior officer after senior officer came out and made it clear the military had no role in the transition of power and would support the Constitution. Not all junior officers felt the same way. That wisdom and understanding of the bigger picture is a key difference between flag rank officers and junior officers. Lee seems to have lacked that wisdom or at least clarity about where his duty truly lay.
—-
To be fair his decision did reflect the controversy of the day that had festered since the Constitution had been ratified regarding to what extent the federal government held sway over states rights.
However that states rights argument needs to be tempered with the cold hard fact that the right in question was whether humans had a right to own other humans in chattel slavery.
——-
On the other hand, in the context of the time, Lincoln believed in pardoning all those involved in order to bind the nation together, thinking that pardoning those responsible would cause them to be loyal to the Union.
It didn’t work that way. Instead, former confederates saw it as a justification that they had been fighting for a worthy cause. That mis perception led to both the discrimination in the Jim Crow era in the south and the rise of the “lost cause” myth that led to the numerous statutes that went up in the 1890s, and frankly still persists today.
Hanging the southern leadership as traitors and criminals who directly or indirectly caused the death of 600,000 Americans would have been harsh in the short term, but would have sent a clear message that probably would have prevented a great deal of the problems we have faced since.