Make sure that when you specify the name of the map, that you are including the full path to the map, and not just the name of the map. For instance if you have a map, “myMap” in the following folder structure: Game/Levels/
Then you need to pass “Game/Levels/myMap” to GameplayStatics::OpenLevel as the FName LevelName.
You can get the correct path, by going into the project settings->Packaging. Then find ‘List of maps to include in a packaged build’ under advanced settings and locate your map with the three dots (. . .), it will then display the proper path to use.
I hope this helps anyone who is still struggling.