Let $V$ be a connected set in $\mathbb{C}$, and $f$ holomorphic on $V$ such that $f(z)^2=\overline{f(z)}$ on $V$.
I want to show that $f$ must be constant on $V$.
My attempt: As $|f(z)|^2=f(z)\overline{f(z)}=|f(z)||\overline{f(z)}|=|\overline{f(z)}|,$ it follows that the $\overline{f(z)}\equiv 1$ on $V$. Then it would follow that the imaginary part of $f$ must also be constant since it must be harmonically conjugate to $1$.
Is this ok?