As far as I understand the operation of a pressure regulator it works basically the opposite way of a spunding valve. While the spunding valve opens when the preset pressure is exceeded the pressure regulator closes.
That is if the pressure in your keg is lower than the preset pressure the regulator will open, letting the CO2 from the cylinder into your keg. When the keg reaches the preset pressure it will close and no more CO2 will flow into your keg.
This mean that if there's nothing preventing the pressure to escape and your keg is below the preset pressure the regulator would evacuate CO2 from your keg.
To avoid this you should make sure that CO2 can't be evacuated from the keg by either:
Connect the regulator to the cylinder (but keep the cylinder closed)
Preset the regulator to a pressure lower than that of the keg
Have a double stage regulator (the first stage work as a spunding valve of the cylinder)
Have a regulator that has a built in counter flow valve*
Also note that after closing the cylinder there will still be CO2 in the high pressure part of the regulator. If your keg is full this gas can contribute significantly to the pressure of the keg (if the preset pressure is higher than that in the keg). In that case you would need to evacuate that part, either by using the relief valve or disconnecting the regulator from the cylinder and connect it again.
* This could work to or against your advantage. If the counter flow valve is placed between the keg and the gauge there would be no flow of CO2 from the keg to the gauge and the gauge would be able not measure the gauge of the keg. However I find this construct unlikely.