Senecio:
My Dell work laptop does exactly the same thing. Its bloody annoying. I'll be docked at my desk with the lid open so I can use the webcam for Teams calls. I'll close the lid, undock and walk 20sec to a meeting room and it won't come back on without a hard restart.
If you have permissions on the laptop, I'd be inclined to reset your power settings to defaults.