Can't cast to widget after saving it in UUserWidget array

When I save a widget in an array of type UUserWidget* (created in c++) through BP and then try to cast to the widget’s original class (that is Inv_Slot_Widget_BP) the cast fails. This text is probably confusing, so here is the print: