It's not very clear what your problem is. The standard shortcut for switching keyboard layouts is Apple/command + space. Does that not work for you? Or perhaps you are hitting it without realizing it and switching to katakana when you do not want to? Because I don't see hirigana switching to katakana all by itself. Please give a specific example of the problem you are seeing.