Is there a way to prevent Windows from periodically deciding that my device is a tablet, when it is actually a laptop?

On Windows 11, the setting “Optimize taskbar for touch interactions when this device is used as a tablet” causes the taskbar to become massive and take up one fifth of the screen. Periodically, it keeps re-enabling itself, even though my device is not a tablet, and I never use the touch screen functionality. Is there a way to make it stop re-enabling itself?