Hi K C6,
Welcome to Microsoft Community.
In Windows 11, tablet mode can no longer be changed from the Settings, it will automatically switch according to the position of the computer, and this is the case.
As far as I know, the motherboard BIOS/UEFI Settings of some brands of computers can turn off the gravity sensor function, and the computer can not recognize the current posture of the screen by turning it off, which can solve the problem of automatically switching the tablet mode to some extent. I suggest you check with HP support to see if this is available.
Thanks for your patience and understanding!
Best Regards,
Manson - MSFT | Microsoft Community Support Specialist