SlateApplication.h failure [Line 212]

I can successfully build the game and it plays fine in the editor, but when I build it it crashes before starting. I get this line in the log:

[2020.10.14-17.38.01:802][ 0]Message dialog closed, result: Ok, title: The UE4-HeroPotential Game has crashed and will close, text: Assertion failed: IsInGameThread() || IsInSlateThread() || IsInAsyncLoadingThread() [File:Runtime\Slate\Public\Framework/Application/SlateApplication.h] [Line: 212]

I can’t seem to find the cause of the issue. Any help would be appreciated!