This has been happening to me since updating from Sequoia 15.0 Subsequent updates, including 15.2, haven't done anything to fix it.
Shortly after wakeup, trackpad freezes, pink flash, reboot. Sometimes has already rebooted when it wakes. I am generally using an external monitor, but it also happens when laptop is plugged in or running on battery and not connected to any peripherals or external monitors.
This only became a problem after updating from 15.0
In the four years prior to that, it was never a problem when using this 2020 M1 MB Air and the same monitor.
It's a real hassle - not all edits get saved, windows don't all reopen, ... Probably happens 3-6 times a day.
There seem to be quite a few posts about this problem, and a few "we're working on it" comments from Apple - hopefully this gets addressed soon.