The hat brim is a line the mask never learns
A baseball cap, a hood, a wide sun hat: the brim throws a hard shadow across the forehead and cuts it off abruptly. Inside a swap, the new face arrives with its own shading, and nothing in the model knows a brim is up there. So the shadow line stays exactly where the original photo put it, and it now falls across a face whose brow, cheekbones and nose are all different.
Why the eye reads it as a cut-out
Trained eyes check two things at a shadow edge: direction and softness. A brim shadow is hard, and its direction traces the hat, not the sun. After a swap the direction still traces the hat, but the geometry that should produce it - brow ridge, forehead slope - belongs to someone else. The mismatch is small and constant, and the eye files it as a face pasted onto a body rather than as a change of light.
Fix it before the swap, not after
Keep the line visible but off the brow. If the shadow lands on the eyes, the new eyes are lit by neither shadow nor fill and look painted on. Turn the head slightly so the line crosses the temple instead: the model gets a clean margin on both sides of the edge.
Tilt the brim rather than pushing it up. Pushing a cap up changes the hat silhouette and the shadow's shape in the same move, so two mismatches ship together. A two-centimetre tilt keeps the outline and shifts the line.
What still breaks
Hard shadows on pale skin pick up a warm rim on the shadow side - ours hides a seam there, which reads as sunburn. A brim over a beard stays wrong much longer, because the beard grain is rendered from the source under a light that no longer matches. Both improve with a low fill card in front: softer edge, less to hide.
The practical default
Treat the hat as part of the frame and keep it in both photos. Swapping into a source that already wears the same hat puts the shadow back on the body, where it does not have to agree with anything.
DeepSwapAI does photo, video and GIF swaps in the browser, HD, no watermark: https://deepswapai.com/?utm_source=indielogs&utm_medium=social&utm_campaign=hat-brim-shadow&utm_content=deepswapai