How to remove all widgets from same class?

I don’t know if this is a bug, I have a box collision to create the widget if a number is 10 or less when entered. On leaving the box, I have the node set to remove from parent, but it won’t remove it.
I don’t know if it loads multiple instances of the same widget or if it fails to remove it.
Remove all widgets does work, but that is not a good solution for as it also remove UI elements.

So is it a way to remove all widget of same class?

I was able to fix it by adding a Get All Widgets Of Class and uncheking the checkbox Top Level Only