Welcome to the Community,
unless you set the virtual disk to "Independent - Non Persistent" in the VM's settings (select the HDD and click the "Advanced" button) the changes should persist. If "Independent" is unchecked (the default) then it's most likely something in Windows itself.
André