Sync Drupal.org MR #1180 to module.
Copying all the commits done in the Drupal.org MR drupal!1180 (closed) Issue: https://www.drupal.org/project/drupal/issues/3206643
The reason is to keep both PR and module in sync.
Later we should handle all the development in the module's issue queue and keep the Drupal.org MR #1180 in sync.
Closes #3071980
Edited by Mohit Aghera