Before putting my laptop in a backpack, I will usually enter it into sleep mode (Win 10) either via hitting the power button or start menu. Sleep is preferable vs fully powering off to persist application states.
Entering Sleep seems to have a ~10s delay before entering Sleep (power led sleep animation starting) during which any mouse or keyboard input will wake the machine aborting the Sleep process. Plugging or unplugging USB-C (power) seems to also wake the machine.
Most of the time, this flow works out okay if I wait to see the LED sleep status activate. Occasionally I’ll find the machine awake in my bag when unintended. Some discussion in a forum thread here.
I wonder if a hardware switch might be a better UX- set the switch to Sleep and it’s out 100% of the time (suppresses any other wake mechanisms) until the switch is toggled. Not sure if this is technically possible over USB, though if it is could perhaps make a expansion card including both a sleep switch and a USB port?