It's annoying--there's no hard and fast rule that I've discovered about it yet. In general--but as you see, not always--with GTK stuff you can get away with your usual LC_CTYPE and GTK_IM_MODULE
OR--no GTK_IM_MODULE and ja_JP.whatever.
My guess is if you remove the GTK_IM_MODULE="scim" it will still work, but that's just a guess. If you feel like trying it, I'd be curious, but there's no real need, as I already know it's a whimsical thing.
It's more idle curiosity on my part.