Unable to delete balance sheet account

I have moved all transactions under a “Loans” balance sheet I created.

When i click the balance sheet it is empty. But when i try to delete it, it says “The form cannot be deleted because it is referenced in the following transactions”.

Is this a bug?

Edit: I am able to work around it by using clone, then deleting the old receipt/payment. But it is quite cumbersome as there are many transactions.

Unless you change the categorization of every transaction allocated to that account you will not be able to delete it. Alternatively, you can mark it as inactive.