Even that isn't really true, since you don't pay taxes on Roth IRAs, and a normal IRA is taxed based on the total amount distributed (since you didn't pay taxes on the amount put in), rather than cost basis.
It's pretty complicated, look up the Secure Act 2.0 for some of the recent changes to try to get more taxes out of retirement accounts.
This would be useful to know how much outstanding capital gains could be paid, if we removed the step up.