If a nation wishes to get out of a treaty, it can simply refuse to follow it. If other nations don't like this, they can appeal to the supreme court of nations which is called war and let might decide who is right. Treaties are, and by their nature must be, at-will contracts that exist as long as all parties to them wish for them to continue to exist. Every treaty is as worthless as the Kellogg-Briand Pact[0] which purported to outlaw war until Germany, Italy and Japan suddenly decided to stop following it and start a second world war.
There are many other examples in political science where politicians have spun elaborate Gordian knots[1] that, for some reason, they pretend they cannot just cut with a common sword.
Article VI US Constitution ...
This Constitution, and the Laws of the United States which shall be made in Pursuance thereof; and all Treaties made, or which shall be made, under the Authority of the United States, shall be the supreme Law of the Land; and the Judges in every State shall be bound thereby, any Thing in the Constitution or Laws of any State to the Contrary notwithstanding.