The path field's URL alias used to be checked only by its form widget.
Validation moved to a new ValidPathAlias constraint on the path field. This stops anything that validates using $entity->validate(), like the node form, REST and JSON:API, from creating duplicate aliases. An alias of "/" is now refused too.
When a second page is saved with the same alias in the same language, it takes over that alias, and the first page is no longer reachable by it.
To see if your site has duplicate aliases, run this query:
SELECT LOWER(alias) AS alias, langcode, COUNT(DISTINCT path) AS pages FROM path_alias GROUP BY LOWER(alias), langcode HAVING COUNT(DISTINCT path) > 1;
On DDEV:
ddev drush sql:query "SELECT LOWER(alias) AS alias, langcode, COUNT(DISTINCT path) AS pages FROM path_alias GROUP BY LOWER(alias), langcode HAVING COUNT(DISTINCT path) > 1;"
PathWidget::validateFormElement() is deprecated and no longer called, so a widget that overrides it needs to be updated. hook_field_info_alter() can be used to replace ValidPathAlias with a constraint of your own. #3644042: Keep the automatic alias skip once core validates the path field proposes this approach for Pathauto.
New: PathAliasInterface::normalizeAlias(), which trims an alias the way it is saved.