Hi,
The formula is calculated and added to the shipping price of the shipping method before the taxes are calculated on that global shipping price.
So I don't think it has anything to do with the formula. It is either that you've turned off the automatic taxes setting and set the Product tax category setting to none in the shipping method.
That's the first thing I would check.
Or, you've selected a zone in the Override tax zone setting of the shipping method and that zone is not taxed based on the tax rules configured in the System>Taxes menu.
Or you have a problem with the taxes configured in the System>Taxes menu.