If you want to control the power/sleep states when the lid closes, this should be controlled within Windows: Control Panel>Hardware and Sound>Power Options>Choose what closing the lid does. I think what you want is 'Do nothing'.
_____________________________________________________________
FPS, Racing, and VR Gamer / Tech Enthusiast / ROG Admin