To avoid potential financial loss, do not refund while the chargeback is active. Instead, request the customer to withdraw their dispute and provide confirmation from their bank. You can then safely process the refund.
Another option is to accept the dispute, but in this case the payment processor won't refund the chargeback fee to your merchant account.