In addition to a very concise answer by Alex Ravsky let me address the case $N=M=1$, following the comment by Gerald Edgar. I am going to omit some technical details (which can be added if necessary).
The classical Cantor function is generated by the function $g$ which is defined by $g(0)=0$, $g(\frac13) = \frac12$, $g(\frac23) = \frac12$, $g(1)=1$ (and interpolated linearly). Now repeat the construction for a different function $g$, defined by $g(0)=0$, $g(\frac13) = \frac23$, $g(\frac23) = \frac13$, $g(1)=1$ (and interpolated linearly).
For instance, at the third step of Cantor's iterative construction we obtain the following function:
Let $u$ denote the limit function, redefined to be zero outside of the Cantor set $C$ (which explains why some pieces of the graph are dotted). Then for $\tilde u \equiv 0$ it is evident that $u = \tilde u$ a.e.
However $\alpha = \frac{\ln 4}{\ln 3} > 1$ is the Hausdorff dimension of the graph of $u$.
Indeed, it is possible to cover the graph $\Gamma_C = \{(x,u(x)) : x\in C\}$ with $4^n$ balls with of $3^{-n}$, which gives the upper estimate $\dim_H \Gamma_C \le \alpha$. For the lower estimate one can consider the image $\mu$ of Cantor measure on $C$ (which is the weak derivative of the classical Cantor function) under the mapping $x\mapsto (x,u(x))$. The measure $\mu$ is supported on $\Gamma_C$ and it is possible to show that there exists a constant $\kappa>0$ such that for any $x\in \Gamma_C$ it holds that $\mu(B_r(x)) \le \kappa \cdot r^\alpha$. Then by Lemma 1.2.8 from [1] it holds $\dim_H \Gamma_C \ge \alpha$.
Dimensions of graphs of some other functions are also discussed in [1].
[1] Bishop C.J., Peres Y. Fractals in probability and analysis. Cambridge; New York: Cambridge university press, 2017.