Testing on my Nexus 5X Android 8.1.0, deploy SM with a custom app, added the "allow unknown app to install" to the profile and the app installs fine.
When I go to uninstall the app however I just keep getting the error
"error: Cannot remove app; not managed on this device"
The app is remotely installed when I deploy so it should be managed. It has the manage image on top of the icon on the phone, however I notice sometimes when I open SM it shows the app with the Install button, and sometimes with the Manage button, even though the app is installed from the start.
Is there another policy setting I'm missing or something with how I added the custom app to MDM?