When trying to change a restricted dvar, the console should give you a reason for why it didn’t change. The dvar g_playerCollision is cheat-protected, which means that to change it, you would have to either enable sv_cheats before changing it or change it through a .gsc script.