Yes, secession is constitutional. The US Constitution’s list of things that states may not do is Article 1 Section 10. It does not include secession. And the Tenth Amendment (in the Constitution’s Bill of Rights) says any powers that states didn’t delegate to the federal government are retained by the states, or by the people. So the states still have the right to withdraw from the Union that they joined.
…but didn’t we settle this in 1865?
No. A state’s right does not depend on which army was stronger in 1865.
Just because Lincoln chose to attack does not mean a future president would, any more than it means that a future president who attacks would be assassinated as Lincoln was. Here’s why a future president wouldn’t attack.
…but didn’t the Supreme Court rule that secession is unconstitutional in Texas v. White 1868/1869?
Not exactly. The majority of the Court said that secession is unconstitutional except “by revolution, or by consent of the states.” Admittedly, that still leaves out unilateral secession. But the foundation for the majority’s reasoning was overturned by 1905 US Supreme Court case Jacobson v. Massachusetts. That case said that the Preamble of the Constitution does not grant the federal government powers.