When using the /gamemode command in the chat box, it works just fine, putting me in the right gamemode. However, for some reason when I type /gamemode creative or /gamemode c in a command block and power it, it switches me into survival mode, and when I try /gamemode survival or /gamemode s in a command block, it switches me to creative mode. After doing some quick testing with switching to adventure mode, moving the command blocks, etc., I think the issue was caused by the fact that the command blocks were directly next to each other. For some reason, when I put command blocks next to each other and place a button on each one, the buttons will activate the command block beside them instead of the one the button is placed on. Maybe it has to do with the behavior of chain command blocks, but they're both normally orange ones and facing away from each other, so I don't know why it's happening. I love to build small, simple command block contraptions such as this one in all my worlds, so I'm kinda sad they're all broken now. I imagine it's probably a simple fix, just tweaking some sort of timing or a few redstone powering values, so I'm hopeful that this may be fixed within the next 2-3 patches. I believe in you.
Unrelated side note: Thanks to you wonderful people at Mojang and the wonderful game you've made, my entire career plan for the future is to invent a hit new game, become a somewhat well-known game developer so you might want me, then sell my soul to you π Thanks so much for being awesome and my biggest role models! ππ
Attachments
Comments

Whatβs happening is that the button activates the command block it is on first, then the one next to it second. This happens because command blocks are activated by redstone power. The button powers the first command block, and the one next to it is activated as a result of being next to a powered block.
What you can do to change this without moving the command blocks, is to put another opaque block on top, in front of, or under each command block, and put the buttons on those blocks. Then each command block will be activated only by the block touching it that you power with the button. They will no longer activate each other because they are only being activated and not powered.
For more information see https://minecraft.gamepedia.com/Mechanics/Redstone/Circuit#Powered_vs._activated