I dunno.
You have to remember that the concept of Federalism was completely different in 1860, when the united states was primarily understood to be a union of fully sovereign states, not a federal entity with constituent sovereigns until the outcome of the war made it so.
There were very few senior career officers at that time and a majority of them had attended West Point around the same time. Like most of them he considered himself a senior officer of the state that had appointed him to West Point. OF COURSE the civil war was about slavery, but for career officers in 1860, the obligation of sworn duty on both sides was NOT a matter of sentimental attachment or loyalty- the senior officers (with few exceptions) broke along lines of where the state legislature landed on the question questions of secession- if you were appointed to West Point by Maryland you stayed. If you were appointed from Alabama you left. Maryland and Delaware were slave states, who fought for the union, until the passage of the 13th amendment.
So Longstreet went with the bad guys, reluctantly. That said, he is pretty much the only example of a very senior confederate officer who served reconstruction publicly and enthusiastically after the war. He supported black citizenship and political equality, didn’t indulge the “lost cause,” and served the United States government in multiple posts at much personal and financial risk. At one point after the war he even led a mostly black Louisiana state militia and local police against white supremacists attempting to overthrow the government.
So it’s more for his redemptive post war service and example that I think Longstreet is deserving (Lee, Davis, all the rest) where others are not.