If you enable an entity for documents (SSS SharePoint online) it will use the entity name field to create the folder in the given site.
However, if you have a duplicate name for a second record, the system cannot map the same document location (and you also do not want that) and the control to load the documents in D365 will fail.

Earlier version this was defaulted to the GUID of the record, but that is not user friendly (and was most of the time disabled with the orgdbsettings tools).
But in the latest version this is defaulted to not use the GUID (which is good!), but this new problem arises now.