In this question the following statement was shown:
Let $f\colon M\to\mathbb{C}$ be a holomorphic, $M\subseteq\mathbb{C}$ open and connected, $z_0 \in M$ and $f$ is constant in an neighborhood of $z_0$. Then $f$ is constant on the whole $M$.
I wonder if it holds that
If $f\colon M\to\mathbb{C}$ is holomorphic, $M\subseteq\mathbb{C}$ open and connected, $z_0 \in M$ and $|f|$ is constant in an neighborhood of $z_0$. Then $f$ is constant on the whole $M$.
Any help is hugely appreciated.