This is also Gallai's theorem (see here, page 12).
Let $A = \{a_{i,j}\}_{1\le i,j \le n}$, be the matrix corresponding to entries in the square.
Define $B = \{b_{i,j}\}_{1\le i,j \le n}$, where $b_{i,j} = \sum_{k=1}^i\sum_{\ell=1}^j a_{k,\ell}$.
Then the sum of the values of $A$ over a sub-square, $(i+1,i+k) \times (j+1,j+k)$, equals the sum $b_{i+k,j+k} + b_{i,j} - b_{i,j+k} - b_{i+k,j}$.
Let the entries of $B \mod 1391$ be a colouring of the $n\times n$ lattice. If $n$ is sufficiently large, then by Gallai's theorem there exists $4$ monochromatic lattice points that are vertices of a square. These correspond to four entries of $B$ such that $b_{i+k,j+k} + b_{i,j} - b_{i,j+k} - b_{i+k,j} \equiv 0 \mod 1391$. This is exactly what we wanted to prove.