How can I change the wixWindow formfactor from tablet/desktop to mobile and vice versa?

The .formFactor method is a getter. It gives you the current device type. You can’t set it to be something else.
I’m not really sure what you’re trying to do. If you want mobile devices to have something like the desktop view, just go to the editor mobile view and design it to look like the desktop.