In a gold-based monetary system, every asset is ultimately backed by gold. This does not mean that every debtor (including banks) keeps the full amount of its liability in gold coin just lying around. Why would one bother to borrow if one did not need the money?
It means that every asset generates a gold income and every asset could be liquidated for gold, if necessary. If a debtor declares bankruptcy, the creditor may take losses. But he can rely on the gold income stream for each asset or if need be he can sell the asset for gold.
In a gold-based monetary system, money is gold and gold is money. Money cannot disappear; it does not go “poof”. Bad credit can be defaulted and must be written off. But money merely changes hands.