This is not really enough. You still have to prove that zero derivative implies constant on a domain. Focusing on the real/imaginary parts and partial derivatives does not make it easier. The key point is the integral formula in grey below. You can do that locally by local convexity, but not globally since $G$ is not assumed to be convex.
Here is a standard argument. To prove $C$ is open, we could also use the series representation of a holomorphic function on a disk, but it is more elementary and direct to use that integral representation here.
Fix $z_0\in G$ and consider
$$
C:=\{z\in G\,;\, f(z)=f(z_0)\}.
$$
This is clearly a nonempty closed subset of $G$. We will now show it is open in $G$.
Take $z_1\in C$. Since $G$ is open, there exists $r>0$ such that $D(z_1,r)$ the open disk of radius $r$ centered at $z_1$ be contained in $G$. Now for every $z\in D(z_1,r)$, we have
$$
f(z)=f(z_1)+\int_0^1 \frac{d}{dt}f((1-t)z_1+tz)dt=f(z_0)+\int_0^1 (z-z_1)f'((1-t)z_1+tz)dt=f(z_0)
$$
using that the real function $f((1-t)z_1+tz)$ is $C^1$ with derivative $(z-z_1)f'((1-t)z_1+tz)=0$. So $D(z_1,r)$ is contained in $C$, which proves that $C$ is open.
Conclusion: $C$ is non-empty, open, closed in $G$ connected, whence $C=G$, i.e. $f$ is constant $=f(z_0)$ on $G$.
Note: as mentioned by @Pete L. Clark, the whole proof works the exact same way if we only assume that $f$ is real-differentiable from $G\subseteq \mathbb{C}\simeq \mathbb{R}^2\longrightarrow \mathbb{C}\simeq \mathbb{R}^2$ with $Df\equiv 0$ on $G$. And dimension $2$ does not add anything special either. It could just be any $f:G\subseteq \mathbb{R}^n\longrightarrow \mathbb{R}^m$. Indeed, every $\mathbb{R}^n$ is locally convex, which is all we need. The only thing that changes is the integral representation, a little bit:
$$
f(x)=f(x_1)+\int_0^1 \frac{d}{dt}f((1-t)x_1+tx)dt=f(x_1)+\int_0^1Df_{(1-t)x_1+tx}(x-x_1)dt=f(x_1).
$$
What we really gain with the assumption that $f$ is holomorphic=complex-differentiable is that we can simply assume that $f'\equiv 0$ on some open subset of $G$. Then the argument shows that $f$ is constant on any connected component of the latter, which are open. Or simply the last part shows that $f$ is constant on some open disk in $G$. Therefore $f$ is constant on the whole connected domain $G$ by the identity principle.