If you marked it billable, then using Add Time & Costs, that brings it to an invoice.
"it came into the invoice as another debit transaction. What did I do wrong?!"
Nothing. But you cannot put it on an invoice like this as the Only Thing. It needs to offset charges, because an invoice cannot end less than 0.
If all you have is this Credit Back, you would mark it Not Billable on the credit card credit; just job track it. Now manually put that same item on a Credit Memo and use the icon at the top to refund it; a credit memo already is the reversal of a sale to the customer.