How to set up custom controls - Pan using Mouse 4 + MMB
As far as I know, you can't use a mouse button as a key modifier, but only keyboard keys. (I don't know how you have set up "Button4" in the input)

"Button4" is only available in the drop-down list of mouse buttons :