You can't, at least not with any degree of certainty. The days that you could stick your money in short money market funds and preserve purchasing power are long, long gone.
Real interest rates even on long dated Treasury bonds are are already deeply negative, never mind short dated T-Bills, so you are forced to invest in riskier assets to try to earn a real return, but that is only suitable if you lengthen your investment horizon.
This is 100% by design. Central banks don't want you sitting on cash, they want you to do something with that cash.