You're pointing out a difference between currency and money, but then treating USD like it's an investment that's a massive loss since 1913, though the point of USD is meant to be a currency, and not a store of value. You're meant to use it at its current price, and it's intended to be worth less over time to encourage you to spend it.
Investments, valued in USD, beat inflation, so it doesn't matter that the USD is inflationary.