AutoAdminLogon registry value reset to 0 after reboot

Recently a customer had an issue where they were setting some registry values in their Azure VM by running a script using the guest agent CustomScriptExtension.
After reboot, one of the values was reset to 0, and another was completely removed.
...(read more)