RE: D365 F&O Vat on Vat Calculation
Hello TeamFunctional,
I have tested this function and the results are as follows.
Your understanding is correct,

Check the above, The second line is for the VAT on VAT calculation, and it is calculating from the first line VAT and its correct.
After I have posted this looks correct entry, see below.

Can you show us if this is not the calculation is happening to you? if not then there is a mistake in setup, check your 2nd tax code and its value defined.
Check if the same tax code is duplicating some tax group or not.
If you don't have any customization, this must be setup issue.
share the results with us.