Related to this question but specifically for a content script.
This article talks about there being a false sense of security when using closed mode because "There's nothing stopping an attacker from hijacking Element.prototype.attachShadow."
However, this article talks about content scripts being run in isolated environments.
Is it therefore safe to assume that any shadow DOM attached via a content script is secure?