As far as I can tell, it’s not really true any more than in other countries.
It’s just really very hard to learn Japanese well, and also to get a good grasp on Japanese culture. The vast majority of foreigners coming to Japan never achieve fluency (from what I can tell, though if there are stats on this I’d be interested).
I've been living in Japan for 7 years. Some of my friends even longer (12+ years), fluent in Japanese, including keigo (formal/honorific speaking) and local dialects. Even if you develop some life-long friendships, you're still a gaijin. You'll always be a gaijin. ESPECIALLY when interacting with anyone outside your immediate social circle.
One friend has a half-Japanese wife and has been here about 15 years. He's finally gotten so fed up with what he feels is disrespect and alienation from a VERY large population of objectively dumber/less ambitious/less successful human beings that he's actually considering moving back to America.
One incident that set him off on a day-long tirade (he was under a LOT of stress at the time) was when he pulled up to a drive-thru to order, he made some jokes with the staff, and I'm sure the staff thought they were talking to a Japanese guy. Then he pulls up to the window....and the Japanese staff are staring at a big black Jamaican man......and they just stared, speechless...then began chatting amongst themselves about how surprised they were. They had totally forgotten their formal customs and courtesies that any service staff would say if they were interacting with a Japanese customer. He blew up, cursed them out in Japanese, demanded to see their manager, scolded the manager in Japanese, etc....
It’s just really very hard to learn Japanese well, and also to get a good grasp on Japanese culture. The vast majority of foreigners coming to Japan never achieve fluency (from what I can tell, though if there are stats on this I’d be interested).