Same thing happening here: mid-2015 MacBook Pro, Monterey 12.3.1. I was being plagued by this to the point that I thought it might be hardware. The machine was incredibly reliable under Mojave; problems have only started happening with Monterey.
To test, a few days ago I wiped the HD, reinstalled from recovery, created a new profile. Reset PRAM, SMC, etc. So this is as fresh as it can be.
I have installed the minimal software I need to work, nothing fancy (FileMaker Pro, BBEdit, Numbers ); the only third-party extensions are Dropbox, 1Password, and Surfshark – no Bartender, nothing pertaining to video, etc. Seemed good for a day or two, then last night, bang – crashed again, WindowServer.
Interestingly, earlier in the evening I had plugged the machine into my television via HDMI. Ran fine, but after disconnecting and the machine sat idle, it spontaneously crashed while I wasn't at the keyboard.
Also previous to the wipe, if I turned off automatic graphics switching, it would crash less.
Before the wipe, I would, when I really needed the machine to be stable, run in Safe Mode, and it would never crash.
So something in Monterey's standard set of extensions that gets omitted in Safe Mode is causing the problem.
I would say it's video drivers, since:
- it's a WindowServer crash
- happens more with graphics switching active
- happens more consistently with external monitor connection/disconnection
- graphic speed in Safe Mode – when it does not crash – is slow and clunky.
Conclusion: some native Monterey video driver that enhances graphic performance when not in Safe Mode is the culprit.
Frankly it's a relief to see it's happening to others; I thought my faithful MacBook Pro was on the way out.
It's clearly a problem for many with a variety of configurations (both Intel and M1), and I hope this detailed report can help Apple take it seriously and fix it.