In fact, sheer military power--not law--prevented South Carolina from seceding from the Union in 1860. No law prevented it. The South Carolina State Legislature had ratified the Constitution and had authorized entry into the Union, and that same Legislature had the authority to revoke the ratification and authorization, which is exactly what it did. There was no law to prevent it.
The prevention of Texas--or South Carolina--from withdrawing from the Union by the US Federal Government and its military is not a matter of law. It is a matter of power. It is the same as if the Government of the European Union and its military action prevented the UK from withdrawing.
Exactly. Which is why it won’t be allowed to happen.