There isnt an easy way to fix that when using that method, because most server proxies have data discrepancies and not always up to date/sometimes inaccurate. Including the one I made, yes there are ways to fix this by adjusting caching rules and etc. but its hard to do if you’re new to this.
Please follow what my last comment said as it uses another method that works to get if game is Public of private: How to get place/game's status(private/public)? - #23 by CAAplayer