As Peteris answered, this is related to the problem of Succession of States. If the new regime declares it is the successor to the old regime, it inherits its treaties, and its debts. If it declares it is a new state, it does not... though their creditors may not agree. Some regimes try to have it both ways: act as successor for the good parts, act as a new state for the bad ones. And some regimes argue about who is the true successor.
There's a third way out: Declare your predecessor an illegitimate government. Anything they did is null and void, including their debts.
Illegal acts of rebellious southern US state governments: 1861-1865
The United States had a problem when it came to reintegrating the rebellious states after their civil war. The US maintains that states cannot secede. If they can't secede they never stopped being US states. If they never stopped being US states, then they owe their war debt. But neither the states nor the Federal government wanted to pay Confederate war debt, and especially didn't want to deal with former slave owners making claims for the loss of their slaves.
They declared the states had never seceded. Instead, their state governments' actions were illegal. This allowed them to remove the rebellious state government while maintaining they never seceded. This also allowed the people to retain their US citizenship and not be declared traitors; they were victims of the state government's illegal acts.
The Fourteenth Amendment directly addresses the issue of debt. The US would have to pay their own debts fighting the rebellion, but they wouldn't pick up the debts of the rebellious state governments. Nor would the states have to pay their formerly rebellious state government's debts.
Section 4. The validity of the public debt of the United States, authorized by law, including debts incurred for payment of pensions and bounties for services in suppressing insurrection or rebellion, shall not be questioned. But neither the United States nor any State shall assume or pay any debt or obligation incurred in aid of insurrection or rebellion against the United States, or any claim for the loss or emancipation of any slave; but all such debts, obligations and claims shall be held illegal and void.
The 14th Amendment says that if you chose to loan money to an illegal government that's your problem.
Illegal occupation of Korea by Japan: 1905-1945
South Korea claims to be to the successor state of the Korean Empire. The Korean Empire was conquered an incorporated into the Empire of Japan. Meanwhile, the Provisional Government of the Republic of Korea declared itself the true government-in-exile. South Korea claims to be the successor to the Provisional Government and thus the Korean Empire neatly skipping over 40 years of Japanese occupation. Any government acts during the occupation they consider to be Japan's.
Polish Puppet State? 1947-1989
When Germany was partitioned, who was the successor state? Who took on Germany's debts? Who paid their war reparations? This was covered in the Potsdam Agreement.
- Reparation claims of USSR shall be met by removals from the zone of Germany occupied by the USSR, and from appropriate German external assets.
- The USSR undertakes to settle the reparation claims of Poland from its own share of reparations.
East Germany would pay the USSR, the USSR would pay Poland. In 1953 the USSR pressured Poland to forgive most of East Germany's debts in exchange for resolving their border dispute in favor of Poland.
After reunification, Germany continued to pay Poland reparations, though it seems a significant point whether they paid Poland or organizations representing Polish citizens. A fine, but important point. There is an ongoing debate within Poland and Germany over whether Poland in 1953 was truly a sovereign state, or a puppet government of the USSR. And whether its agreement was solely with East Germany or reunited Germany.
An issue with all these claims is consistency. A nation must maintain a consistent position with regard to its predecessor, either it was legal or illegal, or it must specific which bits were illegal as in the Potsdam Agreement.
All Nazi laws which provided the basis of the Hitler regime or established discrimination on grounds of race, creed, or political opinion shall be abolished. No such discriminations, whether legal, administrative or otherwise, shall be tolerated.
If it argues by what's convenient at the moment, both positions are weakened, and other countries are more likely to push their claims.