Solved thanks to user **TCFX **from the Unreal Slackers Discord Server.
FSlateApplication::Get().DismissAllMenus();
Solved thanks to user **TCFX **from the Unreal Slackers Discord Server.
FSlateApplication::Get().DismissAllMenus();