There is no codified legal process for a US state to leave the Union, and the only previous attempt caused a civil war
A member of the EU has both an implicit right to withdraw from the treaties (deriving from international customary law around treaties) and an explicit legal path to follow. A process which they control in their entirety (as in they can't be forced to stay longer than they wish by the other countries and can't be forced to leave earlier than the prescribed deadline)
In general a country can't get out of an international treaty unless the treaty itself has provisions for it. Of course the only way to enforce an international treaty, if threats or sanctions are not enough, is war.
The EU isn't really a country, it's a free trade agreement with an unusually democratic (by the standard of FTAs) process for updating its own rules.
The EU isn't just a free trade agreement and it has never been just a free trade agreement. It has always been a political endeavour.
Of course that doesn't make it a country or a nation state at all, but let's not go too far in the other direction when trying to describe it.
Really? You mean that there is something in the US Constitution that explicitly allows a state to secede?
"In the public debate over the Nullification Crisis the separate issue of secession was also discussed. James Madison, often referred to as "The Father of the Constitution", strongly opposed the argument that secession was permitted by the Constitution.[29] In a March 15, 1833, letter to Daniel Webster (congratulating him on a speech opposing nullification), Madison discussed "revolution" versus "secession":
I return my thanks for the copy of your late very powerful Speech in the Senate of the United S. It crushes "nullification" and must hasten the abandonment of "Secession". But this dodges the blow by confounding the claim to secede at will, with the right of seceding from intolerable oppression. The former answers itself, being a violation, without cause, of a faith solemnly pledged. The latter is another name only for revolution, about which there is no theoretic controversy."
https://en.wikipedia.org/wiki/Secession_in_the_United_States