Explanation, if you don't understand the terms "sync speed" or "HSS."
The sync speed being mentioned above is the highest shutter speed at which the sensor is fully uncovered by the shutter curtains. There are two curtains, one opens to start the exposure, the second follows it to stop the exposure. The time between the first and second curtains is the shutter speed.
The shutter curtains have a minimum amount of time it takes them to cross the sensor's surface, which is much less than your camera's fastest shutter speed. If your shutter speed is set to a speed faster than that travel time, then the second curtain follows the first across the sensor, basically allowing a slit gap to scan down the sensor.
The shadow is caused by the second curtain closing during your exposure. At 1/400 shutter speed, the second curtain starts before the first curtain has completed its opening, and since the flash is fired when the first curtain reaches the open side, part of the sensor is blocked by the second curtain.
The sync speed is the fastest shutter speed on your camera that has the first curtain fully open before the second curtain starts to close. That's the fastest speed at which the shutters don't interfere with the flash.
Some cameras and flashes have "high-speed sync" capability, or HSS. Both the camera and the flash have to support it; having it in the camera doesn't make the flash capable, and vice versa. In HSS, the flash actually pulses in sync with the shutter gap moving across the sensor, so even though the shutter is never fully open, the entire image is exposed by flash. You lose some available flash power in HSS because of the need for rapid multiple firings, but the ability to add light in a scene with high ambient light that makes 1/200 or slower shutter speed unusable is an advantage for those situations. Without HSS, you have to use the sync speed or slower on your shutter, in your case, no faster than 1/200, and that shadow will not be there.
Camera-brand flash units that communicate fully with the camera will not let you set an invalid shutter speed, or if capable, will automatically go into HSS mode. With third-party lights, though, you have to know what's going on.