Probably the frustum of the light’s internal shadow camera is too tight. Have a look at the following example that shows how to configure the mentioned frustum. Relevant code section:
Keep in mind that the frustum should be as tight as possible in order to achieve good shadow quality.
Related: Explain the property of light.shadow.camera.near/far/right/left/top/bottom?