Posted this elsewhere but found this post afterwards:
There are a couple ways to trick it if you’re using an aftermarket screen that does not have a sleep/wake sensor installed. First, update the pad to the newest OS since this work around goes away once you update or restore the device. We figured out some work-arounds a couple years back when we got a huge shipment of mini 4 screens that did not have sleep/wake sensors installed. You can use either of these two methods to achieve the same result. All you are doing is tricking the device into thinking the sleep/wake sensor is present long enough to get the “Lock/Unlock” switch to appear, which is not present until a smart case is detected.
A.connect the original screen to it that has the sleep/wake sensor attached. Turn the device on. Using a smart case (or a magnet in just the right spot), get the device to sleep/wake when closing/opening the device. You will hear a “click” as the screen goes black. In settings, go to Display & brightness and turn off the Lock/unlock switch. The sleep/wake button will now work correctly when you install the new screen that does not have the sensor installed.
B. with the aftermarket screen installed and the device powered on, use a small piece of conductive metal to jump the connectors where the sleep/wake sensor WOULD be installed if it were present. When you make the connection properly, you will hear an audible “click” and the screen will go black. When you go to Dislpay & brightness in settings, the Lock/unlock switch will now have appeared, turn it off, and the sleep/wake button will work normally.