What about using Tasker only by granting the following two permissions:
adb -d shell pm grant net.dinglisch.android.taskerm android.permission.DUMP
adb -d shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
Then creating a shell command with Secure settings inside of a "Display off" event profile?:
adb shell dumpsys deviceidle force-idle
Somehow it doesn't seem to work.