I don't know about the Ramen place (I can't believe that they wouldn't take cash?), but I agree with you that more places are doing this kind of "two markets" stuff -- it's even becoming official, in that now there's officially sanctioned "foreigner pricing" for certain temples, shrines, and parks. There's also Google Maps and Yelp vs. Japan's local version (pretty much any review on the former two are useless, and hopelessly biased by clueless tourists).
I'm of mixed minds. I really miss the days when it was possible to be welcomed pretty much anywhere as a foreigner and have almost universal expectations of high quality, scam-free experiences, but those days are pretty much gone now. Foreigners are lining up for mediocre tourist traps because of something they saw on TikTok or Instagram, and there are business people who are willing to take advantage of that fact.
It's also really difficult to serve your local clientele when tourists "discover" your establishment. I have a friend with a restaurant that has become known amongst foreign tourists, and it's nearly impossible for the locals in the neighborhood to visit now. I was talking about it with him a month or so back, and while he seemed happy to have the money -- and therefore unwilling to change the situation -- he also interacted with the tourists in a completely different way. He had a back-channel reservation mechanism for locals and people he knows, but it still requires advance planning for a place that used to be a casual, walk-in experience.