It’s not happening when you try to initiate sleep mode, is it? I have a computer that only ever does something like this when I try to use sleep. I’ve basically just stopped using that feature because nothing I tried ever fixed it. Works completely fine otherwise.