Creating widgets inside a transaction (and calling Undo)

Hello, I am fairly new to editor scripting in unreal and I want to implement undo/redo functionality for my EditorUtilityWidget.

Inside my widget i frequently spawn custom UserWidgets, for example as editable nodes.
I want to track everything the user can do with transactions.
But when i spawn widgets and call undo, the widgets references all disappear, but they are still displayed in the editor window, with all interaction gone.

One of my Spawns looks like this:

UMissionEditor_MissionNode* UMissionEditor_Window::SpawnNode_Internal(
	const TSubclassOf<UMissionEditor_MissionNode> WidgetClass)
	if(!Mission || !WidgetClass || !NodesCanvas)
		return nullptr;

	FScopedTransaction Transaction(FText::FromString("Spawn Editor Node"));
	UMissionEditor_MissionNode* NewWidget = WidgetTree->ConstructWidget<UMissionEditor_MissionNode>(WidgetClass);

	Cast<UCanvasPanelSlot>(NewWidget->Slot)->SetPosition(LocalMousePos - Cast<UCanvasPanelSlot>(NodesCanvas->Slot)->GetPosition());

	NewWidget->OnMouseEvent.BindDynamic(this, &UMissionEditor_Window::UMissionEditor_Window::OnMouseMoveEvent);

	return NewWidget;

I have tried with and without the Modify and everything else i could find about transactions.

Is there something i am missing or do transactions just not handle widget spawning well?

So for now i ended creating my own Undo and Redo implementations:

I Created a class that derives from FEditorUndoClient for every Type of Transaction i want to custom implement. That class has the following Method (“Editor” is a pointer to my EditorUtilityWidget):

void FTransactionBase::RegisterTransaction(const FString& Name)
	GEditor->BeginTransaction(*GetTransactionContext(),FText::FromString(Name), Editor->TransactionDummy.Get());
	Editor->TransactionDummy->DummyBool = !Editor->TransactionDummy->DummyBool;

this just registers an empty undo event to that i can react inside my class.

The TransactionDummy is a Dummy UObject, that has a bool UPROPERTY. Its only purpose is to register some form ob change.

Then i implemented my own logic in the derived PostUndo and PostRedo.

I am still curious about making this work with the integrated Transaction logic, so if anybody has any insight, please leave a comment.