The union was not being attacked. Leaving it is not attacking it. There was nothing to “defend” except imperial ambitions for those in the federal government.
The line about states could not be coerced referred to the exercise of federal power against states that did not wish to be ruled by it......the rule of the sword.
Secession is legal. It stops where all legitimate exercise of power by government stops - CONSENT OF THE GOVERNED.
Bombarding a fort into rubble certainly is.
Even an Islamic divorce is harder than secession. In this country it is governed by law. One party does not just get to walk away
Like any divorce, the South (Congress) should have taken its case to court. There the terms of separation could have been hammered out without resorting to violence. Probably could have been accomplished in less time than it took to fight a war...and certainly with less blood and treasure expended.
And if no settlement could be reached, then at least the South could say it tried to resolve things peacefully first.