Does TimeMachine has an higher priority than the sleep delay?
There is a sleep assertion for Time Machine. So while doing a backup your mac won't enter sleep mode. If you are not sure, while a backup is in progress, check with this command: pmset -g assertions
. In the processes that prevent sleep mode you will found: BackgroundTask named: "Time Machine backup"