If you need a workaround you can also do something like slicer.util.mainWindow().setGeometry(20,20, 500, 500)
slicer.util.mainWindow().setGeometry(20,20, 500, 500)