You can use a command line utility to modify the Transparency, Consent, and Control (TCC) framework: https://github.com/jacobsalmela/tccutil.
The tool allows you to modify entries in the Accessibility Database.
SIP must be disabled
To use this utility, System Integrity Protection (SIP) must be disabled. This is generally not recommended; tread with caution!