Hi,
Please try these steps:
Remove a configuration
To delete a configuration, follow these steps.
In the Azure portal, select Azure Active Directory.
Select Azure AD Connect.
Select Manage cloud sync.
Under Configuration, select your configuration
At the top of the configuration screen, select Delete.
Important
There's no confirmation prior to deleting a configuration. Make sure this is the action you want to take before you select Delete.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.
I was wrong. What @JimmySalian-2011 wrote is correct.
I uninstalled the local agent from the DC and after a while deleted the configuration, and everything is how I would expect it to be.