Before the preceding diff, we had CommCoreModule's codegen (yarn codegen-jsi) using a different version of react-native-codegen than the transitive dependency from react-native. The versions started drifting when we introduced comm-react-native-codegen beacuse we wanted to patch our usage of react-native-codegen without affecting the primary version.
After making the versions of both react-native-codegens match again in the preceding diff, I started seeing this Yarn issue: https://github.com/yarnpkg/yarn/issues/7509
In that diff I also removed the patchfile. Given we don't need the patchfile anymore, we can circumvent the Yarn issue by replacing comm-react-native-codegen with a normal react-native-codegen dependency.