The app that was causing this VERY FRUSTRATING issue with my Samsung Galaxy S6 Edge Plus, was 360 Security. Now, I had used that app for YEARS on this phone and never had this problem until a few days ago, after an update. It's been driving me F&%#ING crazy!
I would couldn't save pictures or so anything on FB, I couldn't access my email... I would get into these constant loops about the Screen Overlay & then Permissions, and I would turn everything off, and try to change permissions, and they were still static. FINALLY it clicked that since the 360 Security app is also a phone cleaner that maybe it is was causing the same issue as the one referred to in the response you got.
By God, I uninstalled it, and everything was back to normal!
So. Now I need to find a few app for security & cleaning I suppose. I also need to re-add all the other damn apps I dumped, trying to fix the problem! LOL! I was determined not to do a hard reset!