Good point. The Civil War would be the “legal precedent” so to speak, that states can’t just decide to secede.
After the Civil War, the Supreme Court held in Texas v. White (1869) that there is no constitutional right for a state to secede.