Hello thanpisit19,
Thank you for using Apple Support Communities.
We understand that your MacBook Pro M1 isn't waking from sleep unless you disconnect all of the peripherals. Knowing this is a good start in diagnosing the issue. This would seem to indicate that one of the devices is causing the issue. The next step is to connect each of the devices individually to see which might be causing the failure to wake from sleep. You can also try plugging the device(s) into different ports, as it could be an issue with a specific port.
Once the issue has been isolated to a specific device or port, get back to us and we can then see where we need to go for a resolution.
Best regards.