I've been seeing the same error, also with an M2 CPU, using Ventura 13.4. I have recently upgraded my system from an older, Intel-based MacBook Pro, and have noticed a few other things didn't work too well after the system migration. Mostly because it was trying to run Intel code through Rosetta in a mostly Apple Silicon toolchain. I needed to install Apple Silicon versions of Java and a number of other tools before things started working correctly. That's obviously not germane to this particular issue, beyond the fact that it has the same kind of smell to me, but I wonder if it might be related to upgrading to Apple Silicon using the migration assistant.