Inflation-indexed long term US treasuries are now earning positive rates of interest. See https://fred.stlouisfed.org/series/DFII30 -- it's not necessarily a high rate (currently 1.74% after inflation with a 30-year term), but when you have millions or billions to invest, it's certainly not nothing.
> (CPI doesn't include energy directly, but it feeds back in).
CPI does directly include energy, including gas [1]. You may be thinking of "core CPI" which excludes energy and food prices.