Dirt, moisture, or oils on the screen can interfere with its electrical sensors.
Keep holding even when you see the "Slide to power off" slider. How Do I Fix An Unresponsive Iphone 11 Screen
Release the button only when the appears on the screen. 2. Clean the Display Dirt, moisture, or oils on the screen can