I'm using the 100% stock Pixel ROM but rooted and the only ways I've found to have a Lock quick setting tile is to either make use of an app being implemented as Admin or the the use of another app that I won't name but it unfortunately lags a lot. To be clear, it locks the screen using root instead of as Admin, so I'm still able to unlock the phone with my fingerprint after. Apps that use Admin to lock make it so that my PIN is required to unlock.
Nova Launcher Prime has three options to lock through gestures (such as double tap a blank spot on the home screen), but I'd rather use a quick setting tile. The first time you use the gesture you assign in Nova to lock the screen, Nova prompts which of the three methods to use.
Admin, like everyone else, a second option I don't remember but was probably just simulating screen off with a black screen for a few seconds and then locking, or using root. The root method locks immediately but since it's not using Admin, the fingerprint reader can still be used to unlock immediately after.
If there is any way to implement a similar root method, that would be very helpful. If be willing to donate extra for the feature.
Thanks and take care.
input keyevent 26