1031 exchange

In 2023, I did my first 1031 exchange, using a Qualified Intermediary. All was by the book and now I'm working on my taxes. I can see how to enter the 1031 information such that TurboTax completes form 8824 properly to defer my capital gains. However, If I enter the date that I sold my rental property when I'm working on that particular property, it also generates form 4797 and gives me the capital gain back. How do I keep that from happening?