is there any way to change this flag?
The developer cannot change this flag. Otherwise, it would be pointless to have this flag, as the developers would simply ignore it by changing the flag.
However, your question indicates a rather significant lack of access to the directory in a given area: the user has limited ability to change this flag. There seems to be no place in the settings for a specific change in this state, since the user can manually provide the rejected permission at runtime.
On a Nexus 5X with a 7.1 preview, βClear Dataβ will clear this flag, although this has wider effects. On Google Pixel running 7.1 and on Nexus 5X running Android 7.0 this flag will not be reset by anything, even a complete uninstallation of the application.
I filed a bug report about this. I am skeptical that the situation will improve significantly in the short term & - at best, they can fix it, so Data Cleansing works reliably.
source share