Unable to edit inspector value during Play Mode

I have a bool variable that I am able to change in the inspector outside of play mode. However, once I enter play mode it retains the value that was set in the inspector (as it should), but no script is able to change it. And I cant change it using the inspector either.
Basically, if I set it to true then enter play mode, it stays true even if I click on it again and none of my scripts can change it. Same thing for false.
Any ideas?

Is there something setting the value every frame?

Well, I guess I solved my own issue. I created a new script under the same name with the exact same code and it now works fine. Must have been a bug, or I somehow broke something.
In any case it works now.