If it is structured correctly so seek local council way before trying this situation ... I found this reference but it is not an endorsement of their services ... you can do your own google search : https://www.1031exchange.com/opportunity-seller-financing/
Can a 1031 exchange be done with selling a rental property with owner financing?
Yes, but the note has to be made payable to the qualified intermediary (QI) and the QI has to collect all of the payments.
Obviously, there will be a charge (probably substantial) for this service.