How to keep widgets on screen after changing levels

.h

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"

#include "Kismet/BlueprintFunctionLibrary.h"
#include "StaticUserWidget.generated.h"

class UUserWidget;

/**
 * 
 */
UCLASS()
class YOUR_API UStaticUserWidget : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	
	UFUNCTION(BlueprintCallable)
	static void MakeStatic(UUserWidget * Widget);

};

.cpp

// Fill out your copyright notice in the Description page of Project Settings.


#include "StaticUserWidget.h"
#include "Blueprint/GameViewportSubsystem.h"
#include "Blueprint/UserWidget.h"



void UStaticUserWidget::MakeStatic(UUserWidget* Widget)
{
	if (Widget != nullptr) 
	{
		UWorld* World = Widget->GetWorld();
		if (World)
		{
			if (UGameViewportSubsystem* Subsystem = UGameViewportSubsystem::Get(World))
			{
				FGameViewportWidgetSlot GVS = Subsystem->GetWidgetSlot(Widget);
				GVS.bAutoRemoveOnWorldRemoved = false;
				Subsystem->SetWidgetSlot(Widget, GVS);
			}
		}
	}
}

Normal empty scene => loaded level, widget persists