$|f|$ constant implies $f$ constant? If $f$ is an analytic function on a domain $D$ and $|f|=C$ is constant on $D$ why does this imply that $f$ is constant on $D$? Why is the codomain of $f$ not the circle of radius $\sqrt{C}$?

The equation can be written as $f(z)\overline{f}(\overline{z})=C^2$.
So $\overline{f}(\overline{z})=C^2/f(z)$ is an analytic function of $z$.
That can only be analytic if it is constant.
