It involves three steps process.
Step # 1
Issue Vendor Credit
(+ sign > Vendor Credit under Vendors)
Make sure to use the same account originally used

Step # 2
Deposit refund to the bank
(+ sign > Bank Deposit under Other)
Received From = Vendor’s Name
Account = Accounts Payable (A/P)

Step # 3
To clear A/P as Bill payment (step # 1 and step #2)
Why step# 3 > step # 2 bank deposit does not apply to specific bill
