Cannot be windowed after packaging

After my project is packaged, I can’t windowize the game through r.Setres 1280x720 w.And the game crashes while executing r.Setres 1280x720 f.