Can I deduct closing costs for sale of a rental property against income rather than capital gain?

Hi Community.  I am quite knowledgeable about taxes, but haven't been able to find a clear answer to my question.  Even my accountant doesn't know for sure.  We sold a rental property in 2022 for a capital gain.  As with any standard sale, we incurred closing cost, which were approximately $50,000, and include standard closing cost items like interest, real estate taxes, transfer tax, agent commission, title fees, etc.  I am aware of the rules for which closing costs are capitalized and which are deductible when you purchase a rental property.  See, e.g., https://www.irs.gov/faqs/sale-or-trade-of-business-depreciation-rentals/rental-expenses/rental-expen....

However, we sold our property in a 1031 exchange, where the taxable capital gain is deferred.  Thus, I want to deduct the closing costs against our rental income rather than apply against the sales proceeds since I do not care that my gain on the sale will be higher since it is a 1031 exchange.  In other words, I am willing to accept a capital gain that is $50k higher since 1031 exchange, but want to deduct the $50k in closing costs  against taxable rental income.  Is that allowed?