Thanks for asking as here in the Community. It could be that you're creating an invoice for a sub-customer. That is why it shows a different customer in the report. The customer shows in the trial balance report could be the parent customer.
I'd suggest you check the actual sales invoice to verify the associated customer.