Tax on freelance income

I'm on humanities visa and waiting for my PR application result. In the meantime, I took a remote freelance job for a US company. I know if I take a freelance job for a Japanese company, I need to pay tax for that income, but I'm not sure for a foreign company.

If I have the money transferred to my home country's bank account, do I need to pay tax to Japan? For context, it's more than 200,000 yen and I'm not from US (there's a tax treaty between my home country and Japan to avoid double taxation)