It looks like I finally found the solution.
The problem was related to the version of TensorFlow. Using the versions recommended on the installation page there is no problem.
https://gpflow.github.io/GPflow/develop/installation.html
I tried to solve the example with gpflow 2.9.1 and tensorflow 2.12.0 and everything worked fine.
Best regards