Doesn’t the script shown in the first picture dis- / enable it?
No, it just keeps enabling it. The tickbox controls it. If you want to toggle, consider one of those: