I believe that in general this cannot be done, as a consequence of the undecidability of the halting problem
(which is also why you can't make absolutely sure that any non-trivial application has no vulnerabilities, or that any non-trivial computer system can't get infected by malware).
, so that instead of disabling a particular function, you'd need to do something expensive like repeatedly crawling the DOM for certain common characteristics of anti-Adblock tactics if you wanted a general script.
With that said, Reek's Anti-Adblock Killer works quite well in conjunction with the ABP subscription of the same name, for specific sites that use specific anti-Adblock methods that can't be defeated with just blocking and hiding rules: [Redacted]
TL;DR: It's a cat-and-mouse game and there's nothing we can do about it.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.