Spawing Landscape Causes Engine to Crash

I’m trying to build a Landscape Generator as a plugin for the Unreal Engine 4.27. So far I have plugin, which is a single Button. On Button click, the plugin should add a lanscape to the scene. The problem is that everytime I try to spawn the landscape, the engine crashes. This is my code for spawning the landscape:
UWorld* world = nullptr; FWorldContext& EditorWorldContext = GEditor->GetEditorWorldContext(); world = EditorWorldContext.World(); ALandscape * landscape = world->SpawnActor<ALandscape>();

The Error I get in the Logs is:
Assertion failed: LandscapeGuid.IsValid()
(in Landscape.cpp)

I tried the same code with spawning a character class and everything worked fine.
Has anyone an idea what might be the problem ?