Both Xcode 13.3.1 and 13.4.1 (but not Xcode 14 Beta) produces XCBBuildService quit unexpectedly. error

Every time I build my project (not any project, it seems like very simple projects are not affected) sporadically there is a pop-up window with:

XCBBuildService quit unexpectedly.

Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.

It's absolutely not clear how to fix (btw, I am using M1 powered machine and the latest macOS Monterey).

When trying to re-build: Build service could not create build operation: unknown error while handling message: unknownSession

I solved it with a temporary solution by utilizing Xcode 13.2.1.

Both Xcode 13.3.1 and 13.4.1 (but not Xcode 14 Beta) produces XCBBuildService quit unexpectedly. error
 
 
Q