Until they seceded, then they now longer owed any loyalty to that corrupt cesspool that Washington DC had become. (Still is.)
But they took up arms against the US, which is the very definition of treason...
None were charged with Treason. Not even Jefferson Davis, the president of the CSA.
As Chief Justice Salmon P. Chase said at the time, "Secession isn't rebellion."
I see your argument, but initially, they (the North) absolutely wanted to try Jeff Davis, Gen Lee and others. There was really nothing constitutionally prohibiting that except for the application of grace.
So the question is: Does a US citizen have absolute protection against the application of federal military force (state militia is a whole different argument)?
One other thing, food for thought.
It was my infantry battalion (2nd Bn, 9th Marines) that intervened in the Rodney King riots in LA. To be fair, the CA Natl Guard did most of the heavy lifting. They didn’t get the credit they deserved. 2/9 was only in support; but the ROE allowed for deadly force.