How to remove previous widget when click on another actor? images below

I feel like this was answered quite thoroughly here:

You need another blueprint to serve as the manager, controlling what is displayed / selected. It’s quite a common thing to do, and applies to a lot of scenarios. And since you’re using widget components, it’s even easier - send its reference to the Player Controller.


More nuanced approaches are in the post above.