Hello,
To disable AD DS & Azure AD Sync :
Set-MsolDirSyncEnabled -EnableDirsync $True
To confirm :
(Get-MsolCompanyInformation).DirectorySynchronizationEnabled
If the output is False, the sync is disabled. https://learn.microsoft.com/en-us/powershell/module/msonline/set-msoldirsyncenabled?view=azureadps-1.0
Important It may take up to 72 hours to complete deactivation once you have disabled DirSync through this cmdlet. The time depends on the number of objects that are in your cloud service subscription account. You cannot cancel the disable action. It will need to complete before you can take any other action, including re-enabling of DirSync. If you choose to re-enable DirSync, a full synchronization of your synced objects will happen. This may take a considerable time depending on the number of objects in your Active Directory.
Hope this helps.
If that was usefull please mark the answer as accepted so others can find the topic
Regards