How can this equation hold $$\sum_{m=0}^{N-1} \sum_{n=0}^{N-1} |u(m,n)|^2 = \sum_{k=0}^{N-1}\sum_{l=0}^{N-1} |v(k,l)|^2$$?
OK, so let's have a look at whether

$$\sum_{m=0}^{N-1} \sum_{n=0}^{N-1} |u(m,n)|^2 = \sum_{k=0}^{N-1}\sum_{l=0}^{N-1} |v(k,l)|^2\tag{1}$$

is equivalent to

$$U^2=V^2\tag{2}$$ 

Let's have a look at a simple $2 \times 2$ example:
$$
U = \left [ 
\begin{array}{cc}
u_a &amp; u_b\\
u_c &amp; u_d
\end{array}
\right ] \\
V = \left [ 
\begin{array}{cc}
v_a &amp; v_b\\
v_c &amp; v_d
\end{array}
\right ]
$$
so that
$$
U^2 = \left [ 
\begin{array}{cc}
u_a &amp; u_b\\
u_c &amp; u_d
\end{array}
\right ]
\left [ 
\begin{array}{cc}
u_a &amp; u_b\\
u_c &amp; u_d
\end{array}
\right ] = \left [ 
\begin{array}{cc}
u_a^2 + u_b u_c &amp; u_au_b + u_bu_d\\
u_cu_a + u_d u_c &amp; u_c u_b + u_d^2
\end{array}
\right ]
$$
and
$$
V^2 = \left [ 
\begin{array}{cc}
v_a^2 + v_b v_c &amp; v_av_b + v_bv_d\\
v_cv_a + v_d v_c &amp; v_c v_b + v_d^2
\end{array}
\right ]
$$

Then (1) becomes
$$
|u_a|^2 + |u_b|^2 + |u_c|^2 + |u_d|^2 =
|v_a|^2 + |v_b|^2 + |v_c|^2 + |v_d|^2 
$$

The two are completely different.  Why do you think they are the same?