Given an entire function $f(z)$, the behavior of $|f(z)|$ on horizontal lines $\{\mathrm{Im}(z)=y_0\}$ seems to be tricky for me. For example, if $f(z)=\exp(iz^2)$, then $$\lim_{x\rightarrow \infty}|f(x+iy)|=\lim_{x\rightarrow \infty}\exp(-2xy)=\begin{cases} 0,& y>0 \\ 1,& y=0 \\ \infty,&y<0 \end{cases}.$$
Are there examples of entire functions $f(z)$ with the property $$\lim_{x\rightarrow \infty}|f(x+iy)|=\begin{cases} 0,& y\neq 0\\ M,& y=0 \end{cases},$$ where $M>0$ (eventually $M=\infty$)?
(I apologize if my question is not suitable for this site; I don't know to formulate it more explicitly.)