If I’m not mistaking, what you’re describing is not preventing Apple from removing an app, but preventing the « managed » iOS device user (ie child) from removing an app. If you want to keep your app you need to back them up on your Mac/PC.