Lee and others took an oath of loyalty to country and constitution and then led armies against what had been the US.
If Southern officers in the army and navy had made it clear from the beginning that they weren't going to take up arms against the United States, the country they'd sworn an oath of allegiance to, it would have taken the wind out of the movement for unilateral secession and the country's problems could have been resolved peacefully and amicably.
But they were too hungry for military glory. Or perhaps they were so used to not thinking about politics that at the one time when they needed to make a clear statement they couldn't do it.
As it was, plenty of Southerners in the navy and marines stayed in, notably David Farragut and Lee's cousin Samuel Phillips Lee. So did generals Winfield Scott and George Thomas.
“Lincoln was trying to counter an unconstitutional secession.”
That is an interesting comment. Can you cite the constitutional provision prohibiting secession?