Gold is not money
Then why is it that a quantity of gold today will buy the same amount of most basic commodities as it did 2000 years ago? It's utterly immaterial whether it's been invested, stored in a bank, or in a hole in the ground.
Because gold isn't money. Money is a creation of the state, and has value because the state says it does and requires it be accepted as payment for debt - including and especially for debts to the state (i.e. taxes) That means if I owe you $50, you can't insist I pay you in gold. If I offer you a $50 bill, you must accept it as payment for that debt. That doesn't stop you from saying you have an old bike to sell, but will only take gold, but that won't be considered a sale under the law but an exchange.
Gold is a good, and as such is more similar to other goods such as cans of tuna, iPhones and classic Ferraris than it is to dollar bills. Any good can be traded for another good, if the parties agree, but the value each good depends on the needs of the person. If you want a car and have gold, and the other guy has a car and wants gold, you may be able to come to an arrangement. If he has a car but doesn't want gold you're SOL.
In contrast to gold and other goods, a dollar has a fixed value, in terms of the state, because taxes are denominated in dollars. If you owe $1000 in taxes on April 15th and hyperinflation strikes and what you could buy with $1 on March 15th cost $1000 on April 15th, you still owe only $1000 in taxes.
The value relationship between goods changes all time. When gold was $1800, it required approximately 1/3 oz of gold to buy an iPhone. Now it requires approximately 1/2 oz of gold. Did iPhones become more valuable, or did their price go up by 50%? Of course not.
If a solar flare took out power across the entire western world with no hope of restoring it for years, iPhones would become valueless and cans of tuna would become much more valuable. If the state somehow survived the "price of gold" in dollars might shoot way up, almost without limit if hyperinflation set in, but an ounce of gold would still buy far fewer cans of tuna than it does today.