Hi Phil,
I’ll forward your concern to our development team. Meanwhile, instead of the provided JavaScript code, you can try using following CSS under Custom > CSS in the Customizer:
.x-widgetbar.collapse:not(.in) {
height: 0px !important;
overflow: hidden;
display: block;
}
Cheers!