Verse UI becoming unresponsive/stuck on screen

I am trying hiding the widget first then the remove, at least if the Remove does not work it was hidden first.

MyUI.SetVisibility(widget_visibility.Hidden)
PlayerUI.RemoveWidget(MyUI)