Gamemode and others not "sticking"

Are you restarting the server after making the changes in the webui?

One thing to note is that the webui only changes the on-disk files, e.g., server.properties. Minecraft, on the other hand, only reads these files on server launch.

Restarting the server should make these changes take effect.

I believe it’s possible to also instead change these attributes immediately without reboot by sending them to the console, which will also update the on-disk files, but restarting should pretty much 100% take care of the persistence of these changes.