Additionally, it seems to be a security measure of Android (6+) when a new app is requesting some permissions. Bringing the UI to manually grant some permissions is seen as potentially dangerous when there is an overlay, for obvious reasons.
Unfortunately, some apps do odd things when an overlay is actively running, especially if the app in question needs to request a new permission. Android absolutely will not allow permissions to be changed when an overlay is running, thus resulting in the “Screen Overlay Detected” error.