Mike Williams 100% agree. We require safeguards within OneDrive to mitigate issues caused by SharePoint users who upload content to their folders that surpass the supported maximum path length. When there's a link to these folders in your OneDrive, it precipitates a disruption, since the synced files now significantly exceed the maximum path length. This results in OneDrive being unable to sync, and the removal of the problematic link becomes impossible due to the modal dialogs presented by OneDrive. This is a known issue, corroborated by others facing similar problems, primarily stemming from the inherent file path length limit of 260 characters imposed by the Windows operating system, which extends to both OneDrive and SharePoint due to their integration with Windows. There's a particular mention of SharePoint Server 2019 increasing the maximum file path length limit from 260 to 400 characters, although this doesn't seem to entirely resolve the issue.
In my case, I don't have to uninstall OneDrive; instead, I can reset it, although it remains an inconvenient solution. Prior to resetting OneDrive, I need to manually remove the offending SharePoint shortcut, locate the problematic files manually, and rename them to adhere to the path length restrictions. Despite these measures, the issue leaves me vulnerable to a recurrence if someone repeats this action through a SharePoint link. This scenario echoes a wider concern within the community, as evidenced by discussions and error messages encountered by others when attempting to sync files from SharePoint, indicative of the path length limit problem.