Thanks for joining us here in the thread. Let me give insights about changing the customer to a sent invoice.
Thank you for sharing some information regarding your concern. Please note that you can't change the default option to delete everything in an invoice. However, in your case, since the invoice has not been paid yet, you can email the customer you sent the invoice to and explain that the customer has been changed. Let them know that they don't need to pay the invoice. After that, you can delete the current invoice, create a new one, and send it to the correct customer. Follow the steps below on how to delete the invoice:
On the other hand, you may also see this link as a help when you need to void or have a refund to your customer payments in QBO: Void or refund customer payments in QuickBooks Online.
If you have follow-up questions about modifying an invoice when changing the customer to a sent invoice, let me know by leaving a comment below. I'm here to help you again. Keep safe!