Stocks: yes, for the long run, not for a single year. Companies can raise prices, so earnings tend to grow with inflation over time; over 2021–23 VTI beat CPI by 8.3% in real terms. But in 2022, the worst inflation year, VTI fell 19.5%. Stocks protect the decades, not the next withdrawal. The long-run picture is in how inflation affects a portfolio.
Gold: a non-core satellite at most. GLD, IAU and GLDM hold gold bullion and pay no income; their expense ratios are 0.40%, 0.25% and 0.10% (issuers). Gold fell 28.3% in 2013 and lost money in both 2021 and 2022, then rose 63.7% in 2025 (GLD calendar-year total returns, same data as above). Which gold fund to use is compared in GLD vs IAU vs GLDM. In a taxable account, long-term gains on gold-bullion trusts are taxed as collectibles, at up to 28% (IRS Topic 409; State Street GLDM FAQ).
Broad commodities: the strongest short-run hedge, the weakest long-run holding. DBC gained 58.2% over 2021–23, but it fell 31.8% in 2008, 28.1% in 2014 and 27.6% in 2015 (same data). Long losing stretches like that are hard to hold through in retirement.