The Select the Power Button Action (Plugged In) machine setting should be configured correctly.
Specifies the action that Windows takes when a user presses the power button. Possible actions include: -Take no action -Sleep -Hibernate -Shut down If you enable this policy setting, you must select the desired action. If you disable this policy setting or do not configure it, users can see and change ...