Actually,very often . Those people who love speaking English can't stop using English. Obviously that kind of people won't be friends so they just come and go but it does get tiring and very embarrassing when I introduce my English speaking friends to Japanese people
I didn't say people haven't treated me that way. I have experienced it, but not for a long time.
I don't have any English speaking friends to introduce to my Japanese friends, and if I did I wouldn't introduce them. I've tried taking along foreign acquaintances who supposedly also speak Japanese as guests on motorcycle rides with a group I belong to.....but they all just stand together, apart from the Japanese members, speaking English amongst themselves, and making things very awkward....so I'll not be inviting any again.
I also don't have the problem at work as nobody I encounter at work speaks English.
Some people are just too insular to have a natural conversation with a foreigner, but those people are in the minority. In more common situations, I got the impression that the foreigner's fluency and naturalness of expression (to include body language and other communication cues) goes a long way toward reassuring people that they won't create an awkward moment by going over your head.
Even as a tourist I never have this too much (and I'm obviously foreign). Occasional people wanting to practice their English, sure. Having to switch to English for practical reasons, sure. But people who refuse to continue the conversation in Japanese when you started off that way, not really.
There is the reverse thing of assuming every Japanese person wants to be your practice partner. Code-switching is hard, also, so if you start off in English the inclination is to continue the conversation that way. Strongest joint language tends to win out by default, so if your co-workers English is much better than your Japanese, you will tend to speak more English with them.
The solution, therefore, is to 1) start conversations in Japanese, and 2) talk to people who don't know much English.