Hello, Samantha I. Fabian.
Welcome to Microsoft Community!
After reading your description, I understand that you would like to be able to set it up to avoid accidentally touching the power button causing the device to go into sleep mode while you are working.
Happily, this is very well realized. I will share with you the following ways to change the settings:
- You can open the Run box with the Windows + R shortcut and type control to open the Control Panel.
- In the menu options of the control panel, click Power Options > Choose what the power button does.
- On this page, you will notice this: When I press the power button.
- You can change the behavior here to Do nothing. (At first you should see them set to Sleep)
- Finally, click Save changes at the bottom of the screen to save the changes.
With these steps, we will be able to disable the power button on the Surface Laptop 7 to avoid any trouble while using it by accident.
If you implement this feature and apply it successfully, you can mark my reply as an answer by clicking “Yes” or “No”. This will increase the visibility of our conversations and bring convenience to users with similar usage needs.
I look forward to hearing from you.
Best Regards.
Leo.L - Microsoft Community Support Specialist