"This method seems to cancel off the outstanding amount on the expense account,"
If you never entered a Vendor Credit, then your deposit is against that original expense account.
If you entered a vendor credit/return, you have an open negative AP; that's why the deposit of the refund is as AP. It isn't against the original expense account. You already took care of that in the vendor return entry.