PC starts again immediately after I have sent it to the sleep mode

Welcome to the EndeavourOS forum @anon44732528

You’re going to have to give a lot more information than that to help us find the cause…

From the A friendly intro about our community rules and tips for the forum topic:

“To receive the proper and quickest way for a solution to your issue, please give us a complete as possible description of your situation. This means mentioning your hardware specs, which DE you’re running, what you were doing before the issue appeared and post logs. (To do that please read this link.)”