Let us define $f = u+iv$ for $u,v : \mathbb{R}^2 \mapsto \mathbb{R}$. $f$ is analytic by our assumption.
We now define the auxiliary function $g = f^2 = u^2-v^2+2iuv$ which is also analytic, since it's a composition of two analytic functions ($f$ and $z^2$). Finally, we define the second auxiliary function $h = e^{-if^2} = e^{2uv}e^{-i(u^2-v^2)}$
Now trivially, we have that $h$ is analytic, since it's a composition of two analytic functions $f, e^z$, and also, $|h| \leq e^2$ by construction. So $h$ is both analytic and bounded, which means that $h$ is constant by Liouville's theorem. But from this we must have that $f^2$ is constant, and therefore $f$ is constant, once again by construction.
Which was to be shown.