Government borrowing is good as long as the returns are bigger than the interest rate, adjusted for risk tolerance. Interest rates are fairly easy to figure out here: just plug in the rate investors are demanding for Treasury securities of whatever maturity you want to finance your borrowing with.
But what about the returns? The best number here is GDP growth (or GDP decline prevented), factoring in all taxation required to pay for the borrowing. But note that I’m not talking about % GDP growth. That compares GDP growth with prior-year GDP. The relevant comparison is $ GDP growth compared with $ government spends to finance it. As long as GDP growth, discounted for risk, is greater than the interest rate required to finance a stimulus, government debt is good.
There’s no “hidden tax” here. There’s an interest rate that you eventually have to pay back, out of the GDP growth you’ve created. When taxes go up to pay for the borrowing, then you do have a GDP loss. But it’s coming out of an expanded GDP, and as long as that expansion was more than the interest rate, that’s a net gain.