If you are syncing with AADConnect, its not supported to remove the last Exchange Server unless you meet certain requriements:
https://learn.microsoft.com/en-us/exchange/decommission-on-premises-exchange
Requirements:
https://learn.microsoft.com/en-us/exchange/manage-hybrid-exchange-recipients-with-management-tools
Otherwise you can follow the steps listed in the first doc I linked but you will have manage recipients on-prem directly in AD or a 3rd party application ( again, not supported in that scenario unless you follow link two above)