I used to teach English in Italy, and one of my fellow teachers used to live and teach in Japan, and he’s also married to a Japanese woman. Once we were talking, and I said something like “they saw you just as a gaijin then”, and hell, he got super cold, and corrected me with “GaiKOKUjin, if you may, I never let anyone call me a gaijin in Japan”

During my first two years in Japan, I experienced some things I’m sure others have experienced in Japan as well (and MANY more have experienced in other countries – and MANY more have experienced MUCH MUCH worse).
I was spat on (or at) a minimum of five times. I am a quiet person. I always move out of people’s ways when walking or riding a bicycle. They never need to move out of my way. I do this as far away as possible. If the person moves back into my path, then I move again. I am extremely quiet. Friends often complain they can’t hear me. I wear regular shirts and trousers. Nothing crazy. No crazy hair style. I think you get the picture. This is what happened:
1) A few men in the 30’s. Walking past me, going the opposite direction. One man spat at me (speckles hit). The others all saw what he did. I heard a bit of laughter. They were all clearly sober at midday.
2) A couple (salarymen?) passing me (same direction) walking. One man spat at me (no moister felt).
3) A group of high school boys riding past me on their bicycles, me walking. I was as close to the building as one could be. There was a minimum of 10 meters of space for them to pass me, before the paved area turned into more paved area. Five of them passed within a half meter of me and spat at me (speckles and one glob landed).
4) An elderly gentleman walking toward me stopped and stood still, staring at me. I smiled, did a general bow, and said Ohayagozaimasu as I neared. When I was about a meter away, He spat at me (speckles landed on my trousers).
5) An elderly lady standing outside on the walkway. I moved into the street ) otherwise I would have bumped into her). She spat at me as I passed. She aimed at the ground. She seemed to just want to make a point and not to hit me.
Now, while I totally agree with you that gaijin are often awkward, unappreciative, whining little cretins who just want to exploit the Japanese people, the jin who spat on me were not gai! They were ALL Nihon! I was completely and utterly shocked. I spent weeks after each saliva assault curled up on my bathroom floor, water trickling over me from the shower head just inches above my shoulder, crying and trying to figure out why they did it. I thought to meself, “Self, they must NOT actually be Japanese! That is the only logical explanation, self.” You see, like you, I understood that the Japanese people were a respectful people. A people who treated others with respect and dignity. I understood the Japanese people were completely unique, unlike the others of ANY other culture, especially the lazy, rude westerners. I told my coworkers and their friends about what happened. They were all as shocked as I was. They all concurred that they could not have been Japanese. For, as we all know, the Japanese are the most well-behaved people to have ever been born.
Then, I told these confidants of mine the one thing (other than saliva, and the people impersonating Japanese people) these five incidents had in common. All of these people, either just before the spit came out, or immediately after the saliva came flying at me, growled/sneered/spat (yes, I know) one word “at” me. They said NOTHING else to me. Literally. Only one word was thrown at me by these people (of varying ages, generations, economy class, neighbourhoods, clothing styles, etc). “Gaijin.” They didn’t call me “gaiKOKUjin.”
When I told me trusted allies this, they all breathed a unified sigh of relief. I could see in their faces they had all been vindicated. Their trust in the world, and the natural order, had been restored. They all then taught me the ways of the Japanese. They informed my ignorant gaijin self that “gaijin” was the casual form of “gaikukujin.” They taught me that formal terms were to be used with people you didn’t know, coworkers, superiors, elders, and casual terms were meant only for close friends and family. They told me it was considered very rude to speak to a stranger, etc. using casual words (especially when referring to someone). However, they schooled my newbie self, this rule only applies when the listener is Japanese. When the listener is a gaijin, then the casual forms are not considered rude.
So, while those who emptied their mouth water on me were, in fact, ‘nihonjin,” they were treating this “gaijin” with the same amount of respect they would treat any “nihonjin.” Though, as my enlightened coworkers with many Japanese years of experience explained to me, the same Japanese who spat at me would NEVER spit at another Japanese person, nor would they use the informal/casual term to refer to another Japanese person (unless, of course, that Japanese person was only a half person, I mean a “ha-fu” (Or, for you snowflakes out there, “hanbunjin.”)). And this meant they were just treating me like they would treat everyone else, as is Japanese culture.
So, you see, this whole “gaijin” vs “gaikokujin” thing is imbecilic. These sensitive, whining, entitled, unappreciative gaijin should be smacked round until they understand that gaijin, while expected to behave by the same rules as nihonjin (although, you all know, we CAN get away with not doing so SOMETIMES! shhhhhh, don’t tell anyone we still play our “foreigner card” to get out of annoying convos with creepy people), gaijin are not to expect the same level of formality in all situations. You are in THEIR country you entitled “Charisma Men!!” It’s only a word! Go home!