The 30-year Treasury yield rates are running more than 2.5% these days so at a 2% rate of inflation, the investor still comes out ahead.  Details at https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield .

Saving cash in your mattress, which is what you seem to be proposing, is indeed a sucker's game, so don't do it.  With more risk of a loss, e.g. the stock market, you can conceivably do much better than 2%.

Deficit spending, Keynes' answer to the Great Depression and Obama's to the Great Recession, gets money back into circulation, pumping up the economy.  The idea is to eliminate deficits only when serious inflation looms.  Here in the US, with cast iron national credit (barring Republican shenanigans), we can finance our deficit cheaply.

For a contrary view, with a static money supply, see Britain's fixation on the gold standard in the 1920's, leading to their own Great Depression several years before the rest of the world.