Cannot cancel document linked with

Hi, I am using:

Installed Apps

ERPNext: v13.34.2
Frappe Framework: v13.34.0

I want to cancel this journal entry JV-04546. But I cannot and get this error message:

Message
Cannot delete or cancel because Journal Entry JV-04545-1 is linked with Journal Entry JV-04587-1

Then I go to linked JV, JV-04587-1 to cancel it too.
I get this error message:

Message
Cannot delete or cancel because Journal Entry JV-04545-1 is linked with Journal Entry JV-04587-1

It is connected to other JV, so I try to cancel the connected JV too. When I cancel the connected JV-04587-1, I get this error message:

Message
Cannot delete or cancel because Journal Entry JV-04545-1 is linked with Journal Entry JV-04587-1

It get same error message with 2nd JV I want to cancel, thus I cannot cancel those documents.

How can I cancel those documents so I can create amendment?
Which log should I see to understand how to do that?

Bump. Any suggestion if I cannot cancel the transactions? Is there a way to force cancel the transactions, like, using bench commands?

In your mentioned case, this is not happening but if this is the case then only a database trick can help.