Indeed, after a reboot, the gateway is displayed in the setting
Otherwise, by applying the registry keys, even if the gateway isn't "visible" in the settings (before the reboot), it still works.
But yes, since the GUID changes with each installation, registry keys are not the best choice.