Here is a new attempt at an example. I prefer to denote the $1$-dimensional module for $G$ over the field of order $2$ with trivial action by $T$ rather than by ${\mathbb Z}_2$, which is used with too many different meanings.

So now we are just looking for an example in which the induced map $H^2(G,M) \to H^2(G,T)$ is not surjective.

Let $G = \langle g,h\rangle$ be the dihedral group of order $8$ with $g=(1,2,3,4)$ and $h=(1,3)$, and define $\pi$ by $\pi(g) = 1$ and $\pi(h) = 0$.

I prefer to describe the example in terms of group extensions rather than cocycles, but I can calculate a corresponding $2$-cocycle if you like.

Consider the group extension of $T$ by $G$ in which $g^4$ is equal to the element $1$ of $T$, and $h^2$ is equal to $0$. This extension is isomorphic to the dihedral group of order $16$.

The corresponding element of $H^2(G,T)$ cannot be in the mage of $H^2(G,M)$, because if it was then, ion the corresponding extension of $M$ by $G$, we would have $g^4 = (1,0)$ or $(0,1)$. But that's impossible because $g$ does not centralize these module elements.