You would need to disable Entra Connect by following https://mattchatt.co.za/how-to-disable-entra-id-connect-sync-using-msgraph-powershell/
Once you disable it, you will be able to delete AD objects replicated to your Entra tenant.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin