After a lot of research I found that in the BME68x library there is a PR pending which are examples in I2C for the library.
The only difference with my old code is that in the examples it has in the setup a Wire.begin() when in my code it did not have it.
Including the Wire.begin() in my code I have managed to make the BME688 work with the BME68x library.
I don’t know why before it worked without the Wire.begin() and now it doesn’t, but adding it has started to work.
Thanks to all of you for your help.