When you Void a Payment, the system assumes the Payment was the issue and not the Vendor Invoice. So the invoice is still available to pay, and the original payment and voided payment are linked to the Vendor Invoice. Which locks the Vendor Invoice from being deleted.
So if the Vendor Invoice was an error, then you will need to unlink the Original Payment and the Voided Payment from the Vendor Invoice, before you can edit/delete the invoice.
From the Unposted Vendor Invoice, click on the Payments tab to locate the two payments. Then open each payment and un-post them, edit the Invoices section and remove the lines that apply them to the invoice. Save. Now close and reopen the vendor invoice, and you should now be able to edit/delete the vendor invoice.