Japanese MacBook Stop Switching to Japanese Language
Could it be that you are accidentally hitting the input source switching shortcuts? If so, you can disable them in the System Preferences.

Also, if you find that the input language changes when you switch apps, this is actually normal behavior. By choosing “Use the same one in all documents” in the input source options, you can greatly decrease the chances of this happening. (With the exception of a few apps that seem to ignore/override this setting. Very annoying.)

If you've experienced this problem only when using Japanese keyboards, then I guess there is a different cause. I use US keyboards, but this unintended switching happens to me too. Mostly when switching to Adobe apps.