let $f(x,y)=u(x,y)+iv(x,y)$. By the Cauchy-Riemann equations: $u_x=v_y=u_y=v_x=0$
Edit: $f'(z)=u_x(x,y)+iv_x(x,y)=v_y(x,y)-iu_y(x,y)=0$
Since $u_x=0$ this implies that $u(x,y)=g(y)$. Since $u_y=0$ this in turn implies that $g(y)=k_1$ i.e. $u(x,y)=k_1$
Similarly, we can show $v(x,y)=k_2$
Therefore, $f(x,y)$ is a constant function. Is this argument sound?
P.S. I know that the function has to be defined over a region but i can't seem to see how that affects the proof. Could someone explain that?
Your argument leaves room for improvement in various respects.
(i) "Since $u_x=0$ this implies $u(x,y)=g(y)$"
Consider in this regard the following example: Let $u(x,y)=0$ when $y<0$ and $u(x,y)={\rm sgn}(x)\>y^2$ when $y\geq0$ and $x\ne0$. Then $u$ is continuously differentiable in the domain $\Omega:={\mathbb C}\setminus$positive $y$-axis, we have $u_x\equiv 0$, but we cannot write $u(x,y)=g(y)$.
(ii) The essential point is that the domain $\Omega$ of $f$ should be open and connected. It is then automatically pathwise connected. Given any two points $a$, $b\in\Omega$ there is a curve $$\gamma:\quad t\mapsto \gamma(t)\in\Omega\quad(0\leq t\leq 1),\qquad \gamma(0)=a,\quad\gamma(1)=b\ .$$ Consider now the pullback $$\hat f(t):=f\bigl(\gamma(t)\bigr)\qquad(0\leq t\leq1)\ .$$ By the chain rule and the basic assumption about $f$ we have $$\hat f'(t)=f'\bigl(\gamma(t)\bigr)\gamma'(t)\equiv0\qquad(0\leq t\leq1)\ .$$ This implies $$f(a)=\hat f(0)=\hat f(1)=f(b)\ ,$$ and as $a$, $b\in\Omega$ were arbitrary we can conclude that $f$ is constant on $\Omega$.