Add an object in the toolbar of each nodered page

Hi all,
I need to insert a dynamic component inside the node red top toolbar. I found this as an example done very well Node-red-dashboard dynamic element in toolbar.
Unfortunately the automatic update only works on the tab where the node is present.
When I select from "Widget in group" to "Added to site section" in the template node the node stops working.
There is a way to add the script in all the tab?