Talking about a 99% tax rate is an extreme and isn’t interesting or relevant when talking about the tradeoff between investing or not. A 99% rate would cause most businesses to quickly close up shop and either enter the black market or leave the country. It would also cause mass civil disobedience and cheating and likely destroy the economy of any country that tried it, similar to what has been happening in Venezuela.
If we are talking about the difference between 20% and 38% that’s a more interesting conversation to have. Taxes are definitely a big deal and most companies try to not get bit as much as they can. Whether you invest in something depends on the risk vs the reward. Higher taxes mean less reward which can result in a previous investment not penciling out.
In most cases a minor tax increase might actually lead many companies to try and make their operations more efficient (e.g. less costly) so they can net the same amount after taxes. In the short term this looks like the opposite of investment because they may be cutting employees, putting off equipment upgrades or maintenance etc. to try and maintain profits. BTW this is exactly the same thing a typical household does when their taxes go up. You don’t see people thinking “oh, I better buy a bigger house to get that juicy deduction because tax rates went up” as that doesn’t make sense.