My Mac's screen turns on in sleep mode
Hello, so i've got an issue with my Mac's screen sometimes turning on in sleep mode or when I lock the screen, when that happens the screen flashes on black with my mouse cursor in the corner, it'll last a few seconds and then turn off again... i've got no idea on why this happens and how to solve this. Any help would be appreciated.
iMac 24″, macOS 12.1