Lender writes it off as unrecoverable bad debt expense.
Borrower records the payoff as ordinary income. Add a specific income account or use Misc.
BTW, for all intents and purposes PPP loan forgiveness should have worked exactly like this but instead, in its infinite "wisdom" the IRS has ruled that PPP loan forgiveness is NOT income and ALL expenses paid with those funds ARE NOT deductible business expenses, which will require an adjusting entry on all our books