as far as i know, what steam deck did is something like this (which is already enabled by default on my CachyOS Handheld, Claw A8):
let say your config for auto sleep is 5 mins
and you’re in the middle of downloading huge size of game (wont finished in 5 mins)
what steam did is
it will continue to download + dim your screen (ignoring the 5mins rules earlier) and AFTER the download is finished, it will automatically enter the sleep mode (tested on my end, AS LONG you didn’t interact with the devices / reset the sleep timer)
atleast on current CachyOS on my Claw A8 is like that (i do think it will be the same in Steam Deck as well), CMIIW tho