@Ole Thomsen
Renaming the server will not break Azure File Sync. However, Azure File Sync will still show the old name in the portal once the server is renamed.
This is documented in the release notes: Release notes for the Azure File Sync agent | Microsoft Learn
Hope this helps! Let me know if you have further questions or issues and I will be happy to assist.
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.