It's controlled by the hidden VIDEOCONLOCK setting.
Unhide the setting:
powercfg.exe -ATTRIBUTES SUB_VIDEO VIDEOCONLOCK -ATTRIB_HIDE
Query the setting: Default value is 0x3C (60 Seconds)
powercfg.exe /QUERY SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK
Set the setting: 300 seconds (5 minutes)
powercfg.exe /SETACVALUEINDEX SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 300