Well I solved the problem, sort of, but I'm not sure what causes it yet. I'm using software that causes the screen to dim to a sort of reddish/orange color under normal circumstances starting at around sunset (f.lux). After disabling it, the problem stops. However, I still need to manually select the "GZDoom" value even though it is already selected, for it to be applied.
F.lux obviously interacts with the software somehow but it's not expected behavior from the side of f.lux (it should not interfere with other applications and it should not randomly deselect gamma settings from those applications). Perhaps there is some system value (or values) that's changed by both the emulator and f.lux.
I didn't know before how to change the gamma settings from the menu, I do know now, so I'm good. By the way, before disabling f.lux, changing these values made no difference:
useglgamma 6
usegamma 1
but now they do. For the record:
Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz 2.81 GHz
NVidia GeForce GTX 1050
Windows 10
Thanks