Soldiers in the US military swear an oath to defend The United States. Not their own individual state but the nation as a whole. Certainly it can be understood that soldiers of individual states would feel in their hearts and minds they are defending their states.
The great majority of the Souths officers had previously sworn that oath prior to secession as officers in the US Army. Rather odd of today’s Democrats to call their Democrat ancestors traitors but indeed they were.
My ancestors were not traitors. They were loyal to their families, communities, and states. I don’t know what oath they swore in 1861, but you were a Tennessean, Virginian, Georgian first and a US citizen second.
PS NO ONE was ever charged with treason after the War of Northern Aggression.
The oath they take is to defend The Constitution of the United States. Big difference. Lee, et al, were most definitely not traitors.