Editor Utility Widgets Feedback

I’m trying to write a simple function to open EditorUtilityWidgets. This function is in the EditorModule of my game.


void FMyGameEditorModule::OpenEditorUtilityWidget(FSoftObjectPath ObjectPat)
{
UObject* WigetObject = ObjectPat.TryLoad();
UEditorUtilityWidgetBlueprint* EditorWidget = Cast<UEditorUtilityWidgetBlueprint>(WigetObject);
UEditorUtilitySubsystem* EditorUtilitySubsystem = GEditor->GetEditorSubsystem<UEditorUtilitySubsystem>();
EditorUtilitySubsystem->SpawnAndRegisterTab(EditorWidget);
}

When i try to compile i’m getting this: error LNK2001: unresolved external symbol "private: static class UClass * __cdecl UEditorUtilityWidgetBlueprint::GetPrivateStaticClass(void)"
on this line UEditorUtilityWidgetBlueprint EditorWidget = Cast<UEditorUtilityWidgetBlueprint>(WigetObject);*
Engine version is 4.25.4

Any idea on how to resolve this? Or another way to open UEditorUtilityWidgetBlueprint?