How to make an EditorUtilityWidget open/run via C++

I got this working in UE5.4. If it helps anyone else, I made a plugin using the “Editor toolbar button” template (NOT the standalone window one), then changed the “.Build.cs” file’s private dependencies to this:

		PrivateDependencyModuleNames.AddRange(
			new string[]
			{
				"Projects",
				"InputCore",
				"EditorFramework",
				"UnrealEd",
				"ToolMenus",
				"CoreUObject",
				"Engine",
				"Slate",
				"SlateCore",
                "Blutility",
                "UMGEditor",
				"UMG",
                "EditorScriptingUtilities",
				// ... add private dependencies that you statically link with here ...	
			}
			);

And then for the actual code in the “.cpp” file I did the following - but you need to:
(1) replace ‘MyPluginName’ with yours, and
(2) the statement after TEXT should be your reference.

So, in content browser, find your Editor Utility Widget, right-click and choose REFERENCE. Then paste that in, replacing the one I have in there. (I had my widget inside “CONTENT>Letsgo” and the widget itself was called “Letsgo”.)

void FMyPluginNameModule::PluginButtonClicked()
{
	UObject* Blueprint = UEditorAssetLibrary::LoadAsset(FString(TEXT("/Script/Blutility.EditorUtilityWidgetBlueprint'/Game/Letsgo/Letsgo.Letsgo'")));
	if (IsValid(Blueprint)) {
		UEditorUtilityWidgetBlueprint* EditorWidget = Cast<UEditorUtilityWidgetBlueprint>(Blueprint);
		if (IsValid(EditorWidget)) {
			UEditorUtilitySubsystem* EditorUtilitySubsystem = GEditor->GetEditorSubsystem<UEditorUtilitySubsystem>();
			EditorUtilitySubsystem->SpawnAndRegisterTab(EditorWidget);
		}
	}

}

However the most IMPORTANT part is the top of the ‘.cpp’ file, otherwise none of it will work:

// Copyright Epic Games, Inc. All Rights Reserved.

#include "AnimPalV2.h"
#include "AnimPalV2Style.h"
#include "AnimPalV2Commands.h"
#include "Misc/MessageDialog.h"
#include "ToolMenus.h"
#include "EditorUtilityWidgetBlueprint.h"
#include "EditorUtilitySubsystem.h"
#include "Editor/Blutility/Classes/EditorUtilityWidget.h"
#include "./../Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorAssetLibrary.h"