When toggling off commands in the World Options screen, the personal game mode is reset. While it visually is correct, the incorrect game mode is applied when applying changes. This only happens if you open the World Options screen when commands are disabled.
Steps to reproduce:
Create a survival world without commands enabled
Open the World Options screen
Enable Commands
Change the Personal Game Mode to creative
Disable Commands (and notice how the Personal Game Mode visually reset to survival)
Apply Changes
Notice how you are in creative and not survival.
Expected result:
When applying changes from the World Options screen, the correct game mode should be applied.
Thank you for helping us improve Minecraft! We saved your files: