Here's something you can do...
Map 2 keys in the keyboard map. Map "set stickset 1" and "set stickset2". Find some other commands you don't ever use and overwrite them.
Set up stickset 1 (in control mapper) as you want, make sure the rudder is mapped. You will need this most times for any non-bomber you fly, and may want it for takeoffs and landings.
Set stickset 2 to the same as stickset 1 (there's a "copy" command). Then UNMAP the Z axis.
When you jump to guns, hit the key you mapped for "Set stickset2"
When you go back to the cockpit, hit the key for "Set stickset1".
Overall I think it was that you were twisting your rudder when you were gunning, maybe. I don't know for sure without a film (P.S. do you have a film?). However, if this seems to help, it's a good walk-around until you find something better.
I use something similar, but not for the rudder, I use it to double the number of buttons on my joystick