This is kinda true but also kinda not. It glosses over that there are all kinds of "foreigners" and they aren't treated the same or thought of the same. You are using "foreigner" to mean (white) Americans/West Europeans.
I can assure you that Japanese don't feel that way about, say, Vietnamese or Malaysian foreigners. (I live in Vietnam, which has a fair number of Japanese companies. I have a Malaysian friend who left at 6pm one day and had a meeting with HR the next morning at 9am.)
My guess (based on admittedly little real evidence) is that they would also be less understanding of Asian-Americans who leave at 5pm than they are of white Americans who leave at 5pm.
One of the most surprising things I've found living in Asia is the large amount of racism pretty much everywhere. I've seen Chinese restaurants with signs saying "No Japanese allowed". I know a Vietnamese girl who puts in her online dating profile "Don't message me if you are Chinese". Heck, even regional "rivalries" are...rough. I was a cafe in South Vietnam where they refused to serve a group of customers from North Vietnam. The North Vietnamese asked, "Do you have tea?" The staff replied, "Yes, but only Southern tea" and walked away without taking their order.