How to allow an app to take screenshots automatically? How can I allow an app to automatically take screenshot?

I'm not talking about apps disabling screenshots on them, I can take screenshot of the thing manually, but I'd like to automate it. I use the app Automate, which has a screenshot action, but when I run it, a dialog appears asking me if I want to allow the app to see everything what is on screen, and that happens every time. I basically want to autoapprove this dialog.

Is there a way to do that?

Thanks
Ok, so I got one possible workaround: use the Automate interact touch block to click on the confirmation button, like in this flow