I may figured out the answer to my own question. The Default Game Mode is myGameMode, however the level I’m using overrides it with InGameGameMode, which is inherited from myGameMode. I guess I have to cast to InGameGameMode itself and then it will succeed. I don’t even know why I wanted to cast to myGameMode, InGameGameMode has the boolean as well, in fact, the correct value I’m looking for is in the currently used GameMode, which is InGameGameMode.
Thanks for your suggestion, it led me to the solution!