Further Drupal 9 compatibility by replacing a deprecated function (see https://www.drupal.org/project/gdoc_field/issues/3202055 ).