I was plagued with this problem before, reset to factory and before long it came back. Like all who experienced this agonising hapless situation where no matter what you do, it kept flashing "Screen Overlay Detected" and it won't change any permission even if you turn off the screen overlay...