That doesn’t seem logical, the taxes are commutative so as long as there’s a difference in tax rate between income tax saved and withdrawal tax rate it’s always a win. (Let’s assume exactly same return with no dividends to make it simpler).
X invested amount.
Ti income tax
Tw withdrawal tax
R return
So 3a returns: X * R * Tw
Vs outside: X * Ti * R
So as long as Tw < Ti it’s a win. (And Ti is marginal rate while Tw is average)