Hi Jacob,
Thanks for taking the time to submit this idea to remove the overpayment credit when deleting a transaction or invoice line item.

At present the system will present the option to remove the overpayment credit when refunding the overpayment: https://docs.whmcs.com/billing-and-invoicing/invoice-management/#refund