How do I remove a widget from outside the widget blueprint?

I tried the following but the event tick ofcourse closes it the moment I open the inventory with the initial TAB press…