After hours of trial and error, I've resolved the problem by deleting the MachineLearning extension (I had installed it before beginning to try debugging). Apparently, the extension comes with an older version of protobuf-java library, specifically the version 3.17.3, and the Ghidra loads this version, not the newer version 3.21.8 that comes bundled with it.