There is no other way. Ad buyers don't trust you, so they run their own invisible captchas to verify the ad is displayed in a real browser.
You can declare that your own site is only going to run static image ads but then you lock yourself out of all ad marketplaces, which require arbitrary JavaScript, so how are you going to actually get ads.
We could just go the source of the problem and ban advertising completely.
> There is no other way.
Of course there is. It’s called sandboxing.
This would be solved by an extremely straightforward regulation. I would propose:
If a website operator grants another company the ability to modify their website, they are liable for any effects of such a grant of control as though they had done it themselves. Additionally, to the extent that any law, regulation or contract requires a website operator to maintain confidentiality or privacy of user data, granting a third party the ability to violate the requirement is deemed violated even if the third party did not exercise that ability.
So, for example, a healthcare company that includes an ad script violates HIPPA if the provider is not itself HIPPA compliant regardless of whether the ad script read any data. If your chatbot said they would not train on your data but they included an unprotected ad script, then they presumptively sold your data and trained on it.
Grant some small defense if the side operator credibly attempted to ensure security.