Sales invoice get items from delivery note - if multiple delivery notes tax only is take from one

I have 2 different tax rates.
In the delivery note this is correct and it shows both tax rates.
When I get ONE delivery note into a sales invoice it is also correct.

When I have 2 delivery notes with different taxes, and I am getting both into a sales invoice, there is only one tax rates.

Please help.
Thanks

I am using
ERPNext: v12.20.0 (version-12)
Frappe Framework: v12.17.0 (version-12)

Can you try setting the tax rate on the Item level?

I did, did not help.