It isn’t “sentiment”. Japan is very well-known for being exceptionally unwelcoming to immigration in general, other than for low-skilled resident workers. Here’s a pretty good overview: https://www.nippon.com/en/in-depth/d00920/
To be fair, that isn’t unusual for east Asia. China is the same, but their demographic crisis is still two decades away.
I replaced it with a more detailed source. Perhaps your confusion is stemming from the way you’re conflating foreign workers and immigrants.