I envisage you either need to write down the value of certain assets or eliminate them completely from your accounts.
Moneydance is based on double entry accounting so it means that every transaction must have a debit and a credit entry. As you are writing down or eliminating the value of assets in you Account set then a debit (or withdrawal/payment) entry in the account makes sense. This is one side of the transaction. To achieve the other side of the transaction I think the easiest method is to create a category specifically for the bankruptcy action and to use this category for each of the transactions.
The result will be that the value of an account will be reduced, potentially to 0, and the value is placed in the bankruptcy category. thus effectively removing the value from your accounts.
In general terms when you are entering transactions that reduce the value of a Asset the category will be an Expense, when you are reducing the amount of a liability using a category it would be an Income category. Moneydance is flexible and you do not have to stick to these, it depends on what you want to achieve and show. Categories are really just another (special) type of account and can have both Debit and credit items in the one category.
Only if you include the categories in your Reports.
Categories have to be defined as either an Income or an Expense item. Accounts are either an Asset or a Liability.
If the loan is being treated as a deferred liability rather than being written off completely then you would set up a liability account and transfer the funds from that. I treated it as the loan being written off, in other words the lender is treating it as an unrecoverable bad debt.
It all comes back to the basis on how it is being handled both in the short and long term and also if there are any assets backing the loan, for example there may be an asset being surrendered so you would have to write that value down to 0 then the balance may be getting written off or it may be still a liability that you repay at some point.