In order to change the party name in the existing invoice, we request that you delete all the payments recorded against the invoice.
To delete a payment we would suggest you please go to Invoices >> Mode >> Delete Payment.
Now attempt to edit the invoice and change the party name.