As the credit note has been issued on the invoice, it cannot be deleted unfortunately and there are a couple of reasons for this but I’ll keep it brief:
An Invoice is a legal document, so completely removing an invoice once it’s been issued isn’t possible but this is where credit notes come in.
Credit notes effectively “write off” invoices that they’ve been applied to, which subsequently “void” it from the accounting ledgers/books.
In the same way, you can’t completely remove an invoice from records, the same applies to credit notes. All of this must be logged, including any mistakes made, so the two are very closely linked together in the way they’re handled in accounting.
To fix it, the mistaken credit noted invoice will need to be recreated and reissued, however, you won’t need to resend it to your end-client. Then, if you haven’t already, apply the credit note the correct invoice.