Sorry to hear that. I suggest you put that question to Microsoft support. If the power button is not causing Windows 11 to shut down it is possible you may need to re-install.
Check your Windows updates first in case you have missed one that may have a bug fix for your problem.
I solved my problem by tweaking the power settings in the BIOS on the motherboard.
Good luck.