You made your app persistent (let me say, hardcoded in the ROM), so Headwind MDM cannot update it.
To make your app updateable but using system permissions, do not store it in the priv-app subdirectory of the ROM.
To grant system permissions to your app, sign it with device manufacturer keys, declare system permissions, add the property android:sharedUserId="android.uid.system" to AndroidManifest.xml.
But instead of preinstalling it in the priv-app ROM subdirectory, let Headwind MDM install the APK. This should keep system permissions but makes your app non-persistent.