I followed the steps on microsoft help to change the Xbox live sandbox for my local PC and it seems to work. Just enable dev mode and device portal in developer settings and then change the sandbox in the browser.
I did not try it with my Xbox in Dev mode yet. But you need to download the "Dev Mode Activation" app on your xbox. Just search for it in the xbox app store.