[step:Group injective $\phi$ by their image $S$ and reduce to determinants of submatrices]
Only injective functions $\phi: \{1, \dots, m\} \to \{1, \dots, n\}$ contribute. Each such $\phi$ has an image $S := \phi(\{1, \dots, m\})$ which is an $m$-element subset of $\{1, \dots, n\}$, and $\phi$ factors as a bijection from $\{1, \dots, m\}$ onto $S$.
Fix an $m$-element subset $S \subseteq \{1, \dots, n\}$. Let $\iota_S: \{1, \dots, m\} \to S$ denote the unique order-preserving bijection (so $\iota_S(1) < \iota_S(2) < \cdots < \iota_S(m)$ are the elements of $S$ in increasing order). Every injective $\phi$ with image $S$ can be written uniquely as $\phi = \iota_S \circ \pi$ for some permutation $\pi \in S_m$.
Submatrix definition: $A_S \in \mathbb{R}^{m \times m}$ is the matrix with $(A_S)_{kj} := A_{\iota_S(k), j}$ for $k, j \in \{1, \dots, m\}$ (the rows of $A$ indexed by $S$, written in the natural order).
We collect all injective $\phi$ with image $S$ and compute their joint contribution:
\begin{align*}
\sum_{\substack{\phi \text{ injective} \\ \phi(\{1,\dots,m\}) = S}} \left(\prod_{j=1}^m A_{\phi(j), j}\right) \sum_{\sigma \in S_m} \operatorname{sgn}(\sigma) \prod_{j=1}^m A_{\phi(j), \sigma(j)}.
\end{align*}
Substituting $\phi = \iota_S \circ \pi$ with $\pi \in S_m$:
\begin{align*}
A_{\phi(j), j} = A_{\iota_S(\pi(j)), j} = (A_S)_{\pi(j), j}, \qquad A_{\phi(j), \sigma(j)} = (A_S)_{\pi(j), \sigma(j)}.
\end{align*}
Hence
\begin{align*}
\sum_{\pi \in S_m} \prod_{j=1}^m (A_S)_{\pi(j), j} \cdot \sum_{\sigma \in S_m} \operatorname{sgn}(\sigma) \prod_{j=1}^m (A_S)_{\pi(j), \sigma(j)}.
\end{align*}
We compute the inner sum first. Reindex by $k := \pi(j)$ (so $j = \pi^{-1}(k)$); since $\pi$ is a bijection,
\begin{align*}
\prod_{j=1}^m (A_S)_{\pi(j), \sigma(j)} = \prod_{k=1}^m (A_S)_{k, \sigma(\pi^{-1}(k))} = \prod_{k=1}^m (A_S)_{k, (\sigma \circ \pi^{-1})(k)}.
\end{align*}
Setting $\tau := \sigma \circ \pi^{-1} \in S_m$ (a bijection of $S_m$ for each fixed $\pi$, with $\operatorname{sgn}(\tau) = \operatorname{sgn}(\sigma) \operatorname{sgn}(\pi^{-1}) = \operatorname{sgn}(\sigma) \operatorname{sgn}(\pi)$), so $\operatorname{sgn}(\sigma) = \operatorname{sgn}(\tau) \operatorname{sgn}(\pi)$. As $\sigma$ ranges over $S_m$ for fixed $\pi$, so does $\tau$:
\begin{align*}
\sum_{\sigma \in S_m} \operatorname{sgn}(\sigma) \prod_{j=1}^m (A_S)_{\pi(j), \sigma(j)} = \operatorname{sgn}(\pi) \sum_{\tau \in S_m} \operatorname{sgn}(\tau) \prod_{k=1}^m (A_S)_{k, \tau(k)} = \operatorname{sgn}(\pi) \det(A_S),
\end{align*}
where the last step is again the Leibniz formula applied to $A_S$.
Substituting back, the contribution from subset $S$ becomes
\begin{align*}
\sum_{\pi \in S_m} \prod_{j=1}^m (A_S)_{\pi(j), j} \cdot \operatorname{sgn}(\pi) \det(A_S) = \det(A_S) \sum_{\pi \in S_m} \operatorname{sgn}(\pi) \prod_{j=1}^m (A_S)_{\pi(j), j}.
\end{align*}
The remaining sum is once again the Leibniz formula for $\det(A_S)$ (applied with the role of row/column index swapped, which gives the same value since $\det(A_S^\top) = \det(A_S)$):
\begin{align*}
\sum_{\pi \in S_m} \operatorname{sgn}(\pi) \prod_{j=1}^m (A_S)_{\pi(j), j} = \det(A_S).
\end{align*}
Hence the total contribution from subset $S$ is $(\det A_S)^2$.
[/step]