To be clear, those companies can still theoretically be acquired but will face tough scrutiny from Japan and it's mostly aimed at China, I don't think Japan has any issue with Saudi Arabia politically.
Sony is Cat 3 which is the highest.
These are basically companies that are important to national security, Sega and Capcom will never make Cat 3. They're both Cat 1 which lists every single publicly listed company in Japan.
The law has always in some form existed, but it used to be that Japan would investigate anything over 10%, now it's anything over 1% for Cat 2/3 companies.
Nexon and Nintendo are Cat 2.
But as I said, even Cat III can be acquired, it's just a lot harder, Sharp Corporation is Cat III but owned by Foxconn since Japan has no issue with Taiwan. Nissan is Cat III but 66% of it is owned by foreign entities and its single largest shareholder is a French company.
To be fair both examples u listed was a while back and on the verge of bankrupt.