If it's not a user-space, but a driver issue, I found powercfg /sleepstudy pretty helpful to determine why a W11 machine didn't enter or exited sleep too often, after the fact.
On my laptop, this led me to discover that my Qualcomm X55 WAN is a real standby drain and that my Lenovo Thunderbolt dock really likes to disable its sleep mode after some big Windows updates, leading to a standby drain after the first time I plugged it in. I'm still surprised how many pitfalls there are with standby, even on Windows.
On my laptop, this led me to discover that my Qualcomm X55 WAN is a real standby drain and that my Lenovo Thunderbolt dock really likes to disable its sleep mode after some big Windows updates, leading to a standby drain after the first time I plugged it in. I'm still surprised how many pitfalls there are with standby, even on Windows.