Issue trying to setup a "menù" widget (blueprint)

I think the solution you are looking for is to check if the widget is currently in focus. Use this as a bool to check if it is the topmost/in focus window to allow you to remove from parent.