The cmake one needs to be updated for each version of protobuf that impacts the file generation or dependencies, which can cause discrepeancies. It actually happens on ArchLinux where the latest cmake (3.26) is unable to properly use the latest protobuf (23.4).
This diff uses the protobuf config file instead and its API, which despite being a bit less convenient to use will remain supported and works as well with the cmake supplied package file, so we can keep using it as a backup.