In the end I fixed it by going to the cordova pluging configuration section and updating there the cordova version to 9.0.0: