Virtual Machines: High-DPI screen scale resets to 100% when I resize VM's window

I've installed Ubuntu (tried 17.10 and 18.04 pre-release), since I have a 4k monitor I went to Settings - Devices - Displays and set Scale to 200%.

Everything looks fine until I resize a VM's window (including opening it fullscreen): Ubuntu resets the scale to 100% and everything becomes small.

How can I avoid this and "lock" the scale at 200%?

I tried this with VirtualBox and VMWare Player with the same results. I know there is a "scale factor" in VirtualBox's settings but it is not the same and it makes pictures blurry.


Fire up your terminal and type:

gsettings set org.gnome.desktop.interface scaling-factor 2

In virtualbox i tested it, and i can resize vm window without losing scaling. This applies to wayland, so 17.10 is best to test this.