Let $G$ be a group and write $G_1 \times G_2 \times G_3$ or $G^3$ for $G \times G \times G$. Let $M, N, P$ be $G_1 \times G_2 \times G_3$-modules such that $$0 \to M \xrightarrow{f} N \xrightarrow{g} P \to 0$$ is exact. Assume that taking $G_i \times G_j$-invariants of the above sequence returns an exact sequence, for any $\{i, j\} \subset \{1, 2, 3\}$ with $i \neq j$.
My question is: does it follow that taking $G_1 \times G_2 \times G_3$-invariants of the above sequence is exact as well?
By left exactness of invariants, all we need to do is prove exactness at $P$. For $p \in P^{G^3}$, we can find $n_1, n_2, n_3$ in $N^{G_2 \times G_3}$, $N^{G_1 \times G_3}$ and $N^{G_1 \times G_2}$, respectively, such that $g(n_i) = p$. If $G$ was finite and $P$ was e.g. a $\mathbb Q$-module, we could average over the $G_3$-orbit of $n_3$ to get a preimage of $p$ inside $N^{G^3}$. However, I don't want to put this assumption. I don't want to assume that the modules are finite over the group ring, either.
I have not been able to make any progress in this general setting. An argument involving spectral sequences might help, but I'm unsure how.
Let $G = C_2$ and let $V \cong \mathbf F_2^2$ be the standard 2-dim permutation module for $G$ over $\mathbf F_2$. Note there is a unique nonzero $G$-module map $f:V \to \mathbf F_2$ (given by $f(x,y) = x + y$), and it kills $V^G = \{0, (1,1)\}$.
Let $N = V\oplus V \oplus V \cong \mathbf F_2^6$ with the componentwise action of $G^3$. Let $P \cong \mathbf F_2$ be the trivial $G^3$-module. Define $g : N \to P$ by taking the sum of three copies of $f$, i.e., $g((x_1,x_2), (x_3,x_4), (x_5,x_6)) = x_1 + \cdots + x_6$. Let $M = \ker g$. Now observe that $g(N^G) = 0$ but $g(N^{G_i \times G_j}) = P$ for $i,j \in \{1,2,3\}$.
Therefore taking $G_i\times G_j$-invariants returns an exact sequence of the form$$0 \to \mathbf F_2^3 \to \mathbf F_2^4 \to \mathbf F_2 \to 0$$ while taking $G^3$-invariants returns an inexact sequence of the form $$0 \to \mathbf F_2^3 \to \mathbf F_2^3 \to \mathbf F_2 \to 0.$$
Edit: More generally, suppose $G$ is a group, $K$ is a field, and $f : V \to K$ is a nonzero $KG$-module map such that $f(V^G) = 0$. Then let $N = V \oplus V \oplus V$ and define $g:N \to K$ by $f+f+f$ as above. Then again we have $g(N^G) = 0$ but $g(V^{G_i \times G_j}) = K$. In particular we get a counterexample in characteristic zero by taking $G = \mathbf Z$ and $V = \mathbf Q^2$ with the action $n \cdot(x,y) = (x + ny, y)$.