As a follow up, I ended up creating a duplicate of the widget, then modifying the source code to only select DIV and SPAN tags, filtering out these empty script tags. To be more extensible I could add an input parameter of comma separated tag names to include, but for my needs hard coding in DIV and SPAN works for now.
I am still wondering about these empty script tags, as they may cause issues later on, and would like to know more about them, why there are generated and if theres any setting that effects them (animations, styles etc)