1. Apps such as Blue light filter apps constantly appear on the top of your screen thus breaking some of the on screen functionalities. Try disabling display over other apps permission of such apps and you should be fine. If you don't know which apps to disable, first enable show system apps and then disable all apps.
2. If you have custom ROM installed such as Resurrection Remix(which was my case) who provides Smart Pixels feature under Settings ->Configurations -> Interface -> Smart Pixels , try disabling that too and you will be able to toggle device admins as well as accessiblity of apps.
3. Also, sometimes it is because of your custom launcher, so try switching to your stock launcher if above solutions don't work.
4. If Accessibility for some apps are on then try disabling them first then try to enable for the apps you wanted to.
5. Uninstalling the anti-virus helps sometimes.
P.S. : Of all the above possible solutions, try the ones which are more suitable to your condition. For eg. you can't try solution number 2 if your ROM doesn't have Smart Pixels.
Hope it helps.