Well Android 11 or 12 doesnt make difference. I am on AMS 23. Do you still have the issue ? What are the battery settings for AMS (look above limited/optimal/no limits?
I have given up wasting time trying to analyse and fix the issue. The notification that webshield has turned itself off does not occur that often, so I just go to settings and toggle the permission OFF then ON again. Just annoying that the setting does not stick.
Well, as the only thing to have Webshield working remains to manually toggle the accessibility service of Avast i was thinking about solution to automate this. So thatsway i was trying to manage this by using the app Macrodroid, which is an automate tool .
By using Macrodroid i found some workaround of how to automatically toggle the Avast accessibility service in Android. My idea and previous observations were that something in the Android devices kills/stopps the webshield in the background but the settings in the accessibility settings in Android system remains on, thats why no notofications are even displayed to activate the webshield. So if you dont know about this issue you will never notice it.
In Macrodroid there is a possibility to create own macro to disable and then enable the accessibility service of Avast for example every day on certain day/night time (or often). By doing this even if the webshield gets off, it will be automaticlly reset to on when the accessibility service toggles off and then on. I am still using this Macrodroid macro since 7 days and can see the webshied active every day. Probably it was set to off in the meantime (i can not notice this) but after re-toggle the acessibility service every morning (it is how i set it up) the webshield is on every day as i can see this.
The Macrodroid app has also a separate feature to keep accessibility services permanent on, in turns of when the acessibility service goes off the Macrodroid app toggles it automatically on again. But i have not tested this yet. Maybe someone can do this test, so we can know which of these workaround is working properly.
All of what i have wrote here can be found on the Macrodroid forum https://www.macrodroidforum.com/index.php?threads/automate-accessibility-services.6459/ where i have disscuss it and where i got help. Of course you have to know how Macrodoid app works, but this is not complicated. After installing the app, you need to create your own macro. Every macro must have trigger (in my case i choose the time trigger - every day at 3:00h) and action (in my case disable Avast accessibility service, then new action Wait 3 seconds, and last action Enable accessibility service of Avast). Save and done. The only thing is that Macrodroid needs extra permissons for doing that, which can easily be done with ADB debugging.
But as i said, please try the macrodroid feature to keep acessibility services running. Just go in the settings of Microdroid and choose “keep accessibility services runnung”, choose the Avast service and done. But again here is the ADB Hack needed to grant extra permissions (if not already done).
Please post here your results and questions. I can help with settings up Macrodroid
I hope we will find workaround.