Let $f: \mathbb{C} \rightarrow \mathbb{C}$ be an entire function such that $|f(z)| = 1$ for all $z \in \mathbb{R}$. The problem is to show that $f$ does not vanish on $\mathbb{C}$.
Here's my attempt: Note that $1/\overline{f(\overline{z})}$ is holomorphic in the open set $U = \{z \in \mathbb{C}: f(\overline{z}) \neq 0\}$. Furthermore, for $z \in\mathbb{R}$, $1/\overline{f(\overline{z})} = 1/\overline{f(z)} = f(z)$. Since $f$ is holomorphic on $U$, $1/\overline{f(\overline{z})} = f(z)$ for all $z \in U$. Thus $1/\overline{f(\overline{z})}$ extends to an entire function.
For $z \not\in U$, then $f(\overline{z}) = 0$. Since zeros are isolated, there exists a sequence $z_{n} \in U$ such that $z_{n} \rightarrow z$. Then $f(\overline{z_{n}}) \rightarrow f(\overline{z}) = 0$.
Does this imply that $1/\overline{f(\overline{z_{n}})} \rightarrow \infty$ as $n \rightarrow \infty$? More specifically, is the function $F(z)$ defined by $$F(z) = \begin{cases}1/\overline{f(\overline{z})} & \text{ if } z \in U\\f(z) & \text{ if }z \not\in U\end{cases}$$ entire?