Solved
Turn Off bug with Android P
I'm using Android P on a Samsung S8, and have been using the Turn Off feature for a few months without issue. After the 5.7 release, it keeps changing my phone's screen timeout to 1 second instead of just turning the screen off. So if I start using my phone, the screen keeps turning off if I don't touch it constantly.
I tried adding a Device Timeout setting to the task as a workaround, but after the Turn Off runs in the task, it doesn't run the Device Timeout (even if I add a Wait for a couple of seconds). However, if I trigger the Device Timeout setting manually, it works.