Assuming a falling US dollar, there will be a phantom gain on the sale of the property where you are receiving money, but a phantom loss on the discharge of the mortgage where you are paying money. Assuming a rising US dollar, there will be a phantom loss on the sale of the property when receiving the money and a phantom gain on the discharge of the mortgage when you are paying the money.
US law does require you to pay tax on the “net” phantom capital gain but will not allow you a loss on the “net” phantom capital loss.
The main reason this occurs is the absurd tax law definition of “functional currency”: U.S. emigrants must pretend for tax purposes that they really earn & spend U.S. dollars and realise foreign currency gains & losses in every daily transaction in a foreign country, even if all their income, assets, and liabilities are in another currency. This requirement came into being in piecemeal fashion, scattered throughout various IRS revenue rulings, and was finally given Congressional endorsement and clarification by the Tax Reform Act of 1986. That Act explicitly exempted businesses from this inane requirement; they can pick a functional currency that actually makes sense. (Remember kids, corporations are people too, except when it’s more convenient for them not to be.)
In drawing up the 1986 Act, Congress examined the confused state of regulations & case law on foreign currency transactions, identified problems for both businesses and individuals, and fixed businesses’ problems while refusing to fix individuals’ problems. One new provision which Congress enacted to address multinational businesses’ issues — “integrated treatment” of hedging transactions, 26 USC § 988(d) — could also have fixed the mortgage “phantom gains” problem. However, Congress explicitly stated their intention that this new provision be “inapplicable to exchange gain or loss recognized by a U.S. individual resident abroad upon repayment of a foreign currency denominated mortgage on the individual’s principal residence”.
The same year, Congress also passed the Immigration and Nationality Act Amendments of 1986, which would drastically expand the number of cases of dual citizenship among the American diaspora. Guess who was the one Senator who was in the perfect position to be closely familiar with both bills and thus to understand their combined impact on the diaspora?