I would suggest just adding another key combination to access the terminal. For instance. ⌘0
F12 is the default shortcut for Mac and Linux.
This shortcut will switch the terminal focus. The default F12 shortcut for Mac (dunno about Windows) will not.
You may need to restart PhpStorm to capture ⌘0 or whatever.
source share