I'm a white guy.
I've been stopped by Japanese cops maybe a dozen times in a similar period.
Most of those were when I was on a bike.*
Although the last two -- several years ago now -- were when I was walking.
To be fair, the second to last time wasn't really a "stop."
A cop came out of his police box next to the train station just as I started down the entrance stairs.
He called after me (in Japanese), "Hey! Did you just come in from the airport?" **
I thought to myself, "His tone sounds like he wants me to stop, but he hasn't actually told me to stop."
So I answered with an exasperated "No!" 「違うよ！」over my shoulder and kept walking. (Ha! Ha!)
* Bikes and umbrellas are probably the most frequently stolen items in Japan.
** We were nowhere near the airport and how he thought I would be able to understand his question in Japanese if I'd just arrived in the country is not exactly clear. But that's Osaka for you.