I have the same exact problem. I expected it was a software issue, but it still happens. It always happen when using it with an external monitor, but I use it that way 95% of the time. I haven’t seen a pattern of apps yet.I picked up a new MBA M1 a few weeks ago and noticed about 2-3 times a day it'll randomly freeze, briefly show a pink screen then reboot itself.
Maybe it’s time to go to the Apple Store…