A history professor of mine once gave an anecdote about the dangers of legal exploitation by claiming that America has outstanding debt to Germany that can’t be claimed. The story goes that America once asked West Germany for some sort of loan, and when reunification started, Germany requested that America pay back its debt in an effort to increase the country’s economic welfare. America promptly told them that the debt can’t be paid back because the debt was to be paid to West Germany, a now legally nonexistent country, and not Germany itself. I’ve never been able to find proof that this happened, so was my professor mistaken about this incident?
I am very skeptical of that claim, especially as there never was a country officially called "West Germany". Rather, what was commonly called "West Germany" was formally known as the Bundesrepublik Deutschland (or "Federal Republic of Germany"), and since 1990 the country has been known as...Bundesrepublik Deutschland.
Which is to say that in 1990, what happened was that the Unification Treaty that was agreed to between West Germany and East Germany saw the latter adopt the 1949 Basic Law (the de facto constitution) of West Germany, and then request accession to the Federal Republic as five new states, plus the reunited city of Berlin. There was a legal option for West Germany and East Germany to negotiate and adopt a new constitution for a merged, new state, but it was considered to be needlessly complicated, and so the former method was pursued.
The fact that East Germany ceased to exist by merging into West Germany is shown by the fact that Germany did not have to reapply for UN membership in 1990, but continued membership under the seat granted to the Federal Republic in 1973 (in contrast, the Federal Republic of Yugoslavia as constituted in 1992 was not considered to be the legal successor to the Socialist Federal Republic of Yugoslavia that had dissolved that year, and had to reapply for membership).
I'd also add that the concept of legal succession, especially in terms of outstanding international loans, doesn't really pay close attention to whether a country is the "same" as the one that incurred the debt. Russia, as the legal successor to the USSR, took on Soviet international debts (which it paid off in 2017). Germany itself paid off the last of its Weimar-era debt raised to pay off World War I reparations in 2010.