Basically yes, but of course there's a way to do it, I'd have thought you'd see it after I told you what I did!
Pure XML settings manipulations don't save because they do not set the changed flag of the window and thus the window settings do not get dumped to the uisettings file. However, there are at least two ways to set the changed flag. The "normal" one is user manipulation. However, since we know that properties changed via /commands are saved we conclude that those /commands also set the changed flag. After the changed flag is set the entire window settings are dumped to the uisettings.
Thus it follows that if you want to manipulate the window size you'd simply change the size attribute and then you'd toggle some window property via a /command, e.g. close/reopen or lock/unlock it.