Hello, leathacamp.
VaTT is correct. You can change the affected account to Accounts Payable (AP) for the withdrawal transaction and ensure appropriate vendor is selected.
Here's how:
- Go to Accountant menu, then select Chart of Accounts.
- Double-click the bank register and locate the withdrawal transaction.
- Select the Accounts Payable account and assign it to the correct vendor.

Then, go to the Pay Bills and link the credit memo to the vendor's bill by clicking the Set credit button. 
You can also read this resource to learn more about paying bill in QuickBooks Desktop: Pay bills in QuickBooks Desktop.
In addition, I've added this article to guide you how to fix if you accidentally apply a credit to the wrong bill: Remove or unapply a credit from an invoice or bill.
If you need further assistance managing your bill and credits, let me know. I'll be around to help you.