It sounds like you have set up the tax rules correctly, but there may be a setting that needs to be adjusted. In Magento, you can set the tax calculation method to either "Unit Price" or "Row Total". If it is set to "Unit Price", then the tax will be calculated based on the tax rate of each individual item, rather than the total of the order. This could be causing the shipping tax to be calculated separately from the product tax.
To fix this, you should check the tax calculation method in your Magento settings and make sure it is set to "Row Total". This will ensure that the tax is calculated based on the total of the order, including both the products and the shipping.
If this does not solve the issue, you may want to double-check your tax rules to make sure they are set up correctly and that there are no conflicting rules that could be causing the problem.
I hope this helps! Let me know if you have any further questions.