I agree with this analysis. Thanks for digging into this!
The Doenet viewer's MathJax wrapper unconditionally injects its own pinned mat...@4.1.0 script and assigns window.MathJax on the way — so when PreTeXt's deferred MathJax script has already initialized, the live engine object gets overwritten with a config object, and whichever script wins the race determines whether the page renders. That's why it's intermittent and looks browser-specific (it's load-order timing, not Chrome).
MathJax 4.1.3 was published July 3 — so every published book changed MathJax versions days before these reports. That could explain the timing.
The "resizes to nothing" is a second bug: the Doenet viewer starts reporting its content height to the parent as soon as it mounts — including near-zero heights while it's still booting or when the render has died — and PreTeXt obligingly collapses the iframe. We'll fix that on the Doenet side (
to not send resize events until first real render).
In the meantime, if PreTeXt wants to remove the bug immediately, you could drop PreTeXt's MathJax <script> from the Doenet -if.html pages — this removes the race with Doenet's MathJax entirely.
Also, PreTeXt could add loading="lazy" to the interactive iframes. Each Doenet iframe currently parses a ~29 MB bundle and boots a worker at page open; on pages with several activities that pile-up will make things slow down.
Longer term I think Mitch's activate-on-click idea may be the right default for embedded activities. Doenet is close to having a static version that is vanilla PreTeXt. We could have that show until the activate button is clicked.
We also have work on the Doenet side to reduce the memory footprint.
Duane