Found out how to uninstall Exchange Server 2019 on Windows 2019 core. The secret is run
setup /mode:uninstall /IAcceptExchangeServerLicenseTerms
and it will tell you something that the GUI doesn’t. One of the services is holding a file hostage, it may be different for you so I’m not going to post the specific file/service.
I just stopped that service and all exchange services and it worked!
The main symptom is that when you try to uninstall Exchange 2019 using GUI, the option to remove the check mark from the mailbox role is grayed out.
I hope this helps someone out there one day.