To remove it whilst in editor mode:
- At the top left corner of the viewport, there is a button with the label “Show”, click it
- Go to “Visualize” and uncheck the Preview Shadow Indicator option.
To remove it whilst playing the game:
- From Unreal main menu, go to Edit → Project Settings
- Type “preview” in the search details input
- Uncheck the “Render Unbuilt Preview Shadows in game” property under the “Engine - Rendering” section