If a Japanese firm is in full agreement to be acquired by a non-Japanese company (especially a gaming one), they very well can be.
Just ask Digital Kids, Grasshopper, SNK, and Tango - all Japanese studios that were bought out from non-Japanese companies.
You guys don't seem to understand and this is one of the reason why the internet is misleading especially when it comes translation and such. That's why I don't really trust this Square Enix thing either (most likely some article clickbait or poor translation and speculation). So rumors, leaks, translations and such aren't supposed to be taken seriously, my comment as well, really, but the internet thinks otherwise and places like twitter gets heated up for no reason.
The reason why this "japanese government prohibits western yada yada..." started in the first place is most likely because there is a whole event of history behind this and someone just summarized it, passing information with different nuance. Japan usually has multiple holders, trust banks holding a major public company's stock, that's why major JP publishers aren't acquired easily by foreign companies. Even companies or people inside Japan could be difficult depending on the situation, so forget Microsoft, Disney, Tencent, it wouldn't be easy for Sony either. If Square Enix really wants themselves bought, it could be easier, but looking at this situation, they are talking about their studios so it seems like a Warner Bros Game type of situation. Now the studios @twintail mentioned are all small/private ones so they can be "acquired" normally even if outside of Japan.
A lesson on takeovers. There are typically 3 types, mergers, acquisition, and hostile takeovers. There is agreement on both sides if it's an acquisition or a merger. Example of acquisition Microsoft buying Activision Blizzard, example of merger Square merging with Enix. Hostile takeovers are basically what Elon Musk tried to do with Twitter. The company's board of director rejects the offer, but is still forced upon. You can force a takeover, but it does require an agreement with the shareholders. It becomes a lot more complicated. There is a whole lot of process with an acquisition just like what Microsoft is going through rn with Activision Blizzard, but hostile takeovers could be even more challenging. That's why most company owners hold on to the majority of the stock to avoid these issues. You can't just perform a hostile takeover on Nintendo or like The Pokemon Company (which is even more complicated) because they hold majority of their shares, obviously it won't go through. You can invest on Nintendo because they are a public company (like what Saudi did *cough *cough) but acquiring is a whole different story. TPC is private so it would be close to impossible to invest on them. Hostile takeovers are not possible with private companies, so like Valve is also not available unless with an agreement (acquisition). We got to see that with Sony and Bungie where a private company was acquired. Bungie is a good example here because they used to be a part of Microsoft, and then became private, then bought by Sony. Square Enix sold off their western studios similarly to how Microsoft let go of Bungie but instead of going private, Embracer Group scooped them up. So with that in mind, it's not impossible to acquire JP companies if they want to be sold, but we know it is quite difficult because major shareholders are JP trust accounts.
Majority of people on the internet are sciolist. Keep that in mind. Typically we are consuming false/lack of information like propaganda.