Runtime Access Tracking settings for custom applications changed to "None" after a clone


Description

During a clone, Runtime Access Tracking settings on a custom application (sys_app) record on target instance is not preserved properly and is set to "None"

Steps to Reproduce

On instance 1:
1. Open Studio
2. Create a new custom application
3. Create some application files in the app, eg: table and fields.
4. Navigate to the application record (in sys_app table) for the app created in step 2 and notice that the runtime access tracking is set to "Tracking"
5. Publish the application to application repository.

On instance 2:
6. Navigate to System Applications > My Company Applications and install the application.
7. Open the sys_store_app record for the app and notice that the runtime access tracking is set to "Enforcing". This is expected.
8. Request a clone of instance 2 over instance 1.

Expected: On instance 1, the sys_app record for the app is preserved with the runtime access tracking = "Tracking".
Actual: On instance 1, the sys_app record for the app is preserved but the runtime access tracking is set to "None", hence disabling cross-scope access functionality for the app.

Workaround

Manually update the value of runtime access tracking to "Tracking" for the custom application records (in sys_app table) on target instance after the clone.
Or, if the application has been linked to source control and all changes were committed before the clone, then apply remote changes for the app.


Related Problem: PRB1458211