You can change the deposit account of an invoice even after payment has been synced to Xero. You just need to follow below mentioned steps.
1) Log-in your Xero account and go to the invoice for which you want to change the deposit account. Then click on "Payment" as shown.
2) A new page will open. Click on "Remove & Redo" to revoke the payment. (As shown in the below image)
3) Now, go to "Sales" and ensure that your Invoice shows status as "Awaiting Payment". (See the below Image)
4) Go ahead and click on the Invoice. You will see that it will ask for the deposit account for payment. Now, choose the deposit account.
5) Once you select the deposit account, now click on "Ädd Payment" as shown.
That's it! you have successfully changed the deposit account for the invoice for which payment has been synced to Xero!