The machines fall back to credit/debit only when they need to restocked with cash or coins, or if the machine needs to be serviced. Some stores don't want to pay for the labor needed to maintain their cash features.
The last time I was in a Walmart was over a year ago, but their machines took cash.
They do where I live.
All of the purpose build self checkout machines at Home Depot are cashless but all the ones that can be operated by an employee do cash when in self checkout mode.
It is an important matter! Needs to be worked through, rights established and enforced.
It's lost because they’re mostly legislating that “storefront” businesses must accept cash when both having storefronts and accepting cash are things businesses are less interested in. So, what they have actually done is accelerate the death of storefronts rather than assure that cash is usable.
How is it lost? Jurisdictions like New Jersey, Rhode Island, San Francisco and Philadelphia have legislated that businesses must accept cash.
There are bills being worked on at the federal level.
https://www.congress.gov/bill/117th-congress/house-bill/4395