Alternatively on Android you can use Smali Patcher https://forum.xda-developers.com/apps/magisk/module-smali-pa... with a rooted Android. This program will generate a magisk module that will enable disabling the secure flag for the pesky apps disallowing screenshots. It will also allow you to enable mock locations. At your own risk.