Externally Edit Level Script Actor

How would one edit Level Script Actor programmatically from Editor/Plugin.

Upon button press, I would like my plugin to write “Hello” to TestString variable in current level script actor.

AMyLevelScriptActor* levelScript = Cast<AMyLevelScriptActor>(World->GetCurrentLevel()->GetLevelScriptActor());
levelScript->TestString = FString("Hello");

While having the level opened, I get the reference to level script actor and set the Test String variable. After that I mark the package for dirty, so it forces re-save.

If I run the game immediately, the value is set correctly to “Hello”. But I if I open level blueprint, the value gets reset to nothing. Level is also saved without that variable.

It would be really big help if anyone has any idea what to do. This code works for any other actor in the level.