Deductions & credits

It is now 2022 taxes and I cannot find a decent answer to this question. Or anywhere does it say WHERE to record the Mortgage Payoff on the sale of a rental property.

So it begs the question, Why the hell cannot you deduct that mortgage payoff from the expenses from the sale?  The property is a rental, which is a business, and in order to sell the property, the business expense portion of the sale is the payoff of the mortgage. Thus it should be reported under expenses to sell. Correct?