When using the artillery gun on a railjack, if your "Switch Weapon" key is bound to anything other that default ("F"), you cannot switch between gun modes.
Steps to reproduce (requires at least 1 non-NPC squad mate):
Edit your keybinding and change your "Switch Weapon" key to anything other than default (i.e. "Y").
Get at least 1 squad mate and enter a railjack mission.
Have your squad mate enter the artillery and change the fire mode to "gun mode".
Have your squad mate exit the artillery pod so you can enter.
Fire the weapon to ensure that it is in fact in "gun mode".
Try switching the mode back to artillery by hitting your newly re-assigned "Switch Weapon" key.
You should notice that the artillery pod stays in gun mode and does not switch back to artillery mode.
If you need more information or a demonstration, please DM me and I'll be happy to provide it.