Item rows double from purchase order to purchase invoice (bug)

Hello Team

When I create Purchase Invoice from a submitted Purchase Order’s dashboard, item rows are sometimes getting doubled.

Purchase Order

Purchase Invoice

What can possibly be the reason(s) for it? I have custom scripts on both purchase order and invoice, but none seems to have any impact.

I have locally hosted server.

Thanks.

To prove and confirm that, in a test environment separate from production maybe remove these in turn?