If $|\lbrace g \in G: \pi (g)=g^{-1} \rbrace|>\frac{3|G|}{4}$, then $G$ is an abelian group.

Fix any $s\in S$. Define three sets: $T=\{\,t\mid t,st\in S\,\}$, $T_1=\{\,t\mid t\not\in S\,\}$ and $T_2=\{\,t\mid st\not\in S\,\}$. Then, clearly, $T=G\setminus(T_1\cup T_2)$. Hence $$|T|=|G|-|T_1|-|T_2|+|T_1\cap T_2|>|G|-\frac{|G|}{4}-\frac{|G|}{4}=\frac{|G|}2$$ Moreover, if $t\in T$ then $$st=((st)^{-1})^{-1}=\pi(t^{-1}s^{-1})=\pi(t^{-1})\pi(s^{-1})=ts$$ Hence $T\subseteq C_G(s)$. Hence $|C_G(s)|>|G|/2$ and so $C_G(s)=G$ for any $s\in S$, which implies that $S\subseteq Z(G)$. So $|Z(G)|>\frac34|G|>\frac12|G|$ thus $Z(G)=G$


Hint. This answer is exactly the proof for $\pi=\text{id}_{\text{Aut}(G)}$. Can you change the wording to extend it to an arbitrary automorphism?


Let $t \in S$ and $x \in S \cap tS$. There exists $s \in S$ such that $x = ts$. Note that we have $s^{-1}t^{-1} = x^{-1} = \pi(x) = \pi(ts) = \pi(t)\pi(s) = t^{-1}s^{-1}$. Therefore $t$ and $s$ commute. This implies $t$ and $x$ commute. We have shown that $C_G(t) \supset S \cap tS$. But $S \cap tS$ generates $G$ since its size exceeds $|G|/2$. So, $t \in Z(G)$. This proves $S \subset Z(G)$. Now, since $S$ generates $G$, we have $Z(G) = G$, i.e., $G$ is abelian. This implies $x \mapsto x^{-1}$ is an automorphism of $G$ and it must be equal to $\pi$ because they agree on a generating set, namely $S$.