Much as described by @ElliotGlazer above, let's consider the question for models of the form $(V_\kappa,V_{\kappa+1})$, assuming ZFC in the background, considering all such where $\kappa$ is inaccessible in the background.
Then with respect to this particular class of models, a $\Pi^1_2$, non-$\Sigma^1_2$ statement is "There is a wellorder of the proper classes, which $\Pi^1_1$-definable from some set parameter". (However, the proof that it is not $\Sigma^1_2$ breaks if we replace "inaccessible" with "weakly compact", and I don't know what the situation is if we do this.)
For $\Pi^1_2$ it is a direct computation: First, note that set-quantifiers are absorbed by class quantifiers, so we can say the "There is a $\Pi^1_1$ formula $\varphi$ and set parameter $p$" at the front. Then just say that $\varphi(p,X,Y)$ defines a strict linear order $<^*$ of the classes, and for every class $C$ coding a sequence $\left<C_n\right>_{n<\omega}$ of classes, there is $n<\omega$ such that $\neg(C_{n+1}<^*C_n)$.
If $V=L$ is the background universe, there is such a wellorder of $V_{\kappa+1}$. For given $X,Y\subseteq V_\kappa$, just say "For every set $Z\subseteq V_\kappa$ coding a model $M$ satisfying ZF$^-$ + "$\kappa$ is the largest cardinal" with $V_\kappa\cup\{X,Y\}\subseteq M$, we have $M\models$"$X<_LY$". (We automatically get wellfoundedness of $M$, using the inaccessibility of $\kappa$ in $L$.) This generalizes to when $V$ is a short extender premouse which is iterable in some larger universe, so it is consistent with many Woodin cardinals.
Now let us show that the statement is not equivalent to a $\Sigma^1_2$ (uniformly in the context mentioned above). For suppose it is, with $\Sigma^1_2$ formula $\psi$. Force over the background universe to add a Cohen subset $X\subseteq\kappa$ (i.e. with conditions of size ${<\kappa}$).
Then $V_\kappa^{V[X]}=V_\kappa^V$, and if $A\in V_{\kappa+1}$ and $\varphi$ is $\Pi^1_1$
and $(V_\kappa,V_{\kappa+1})\models\varphi(A)$, then $(V_\kappa,V_{\kappa+1}^{V[X]})\models\varphi(A)$. (This is a standard fact: letting $\neg\varphi(A)$ be $\exists B\subseteq V_\kappa\ [\varrho(B,A)]$ where $\varrho$ is $\Sigma^1_0$,
and $\tau$ be a name for a witness, working in $V$, where the forcing is $\kappa$-closed, we can construct a filter $G$ which meets enough sets that $B=\tau_G\in V$ also witnesses the statement, a contradiction.)
Therefore $\Sigma^1_2$ truth also goes up to $V[X]$, so
$(V_\kappa,V_{\kappa+1}^{V[X]})\models\psi$. So we have a wellorder of $V_{\kappa+1}^{V[X]}$ which is definable over $V[X]$ from a parameter in $p\in V_\kappa\subseteq V$, but then by homogeneity of the forcing, we get $X\in V$, a contradiction.
Remark (correcting remark in earlier version): If we started with $V=L$, then $\kappa$ is not weakly compact in $V[X]$.
(Edit): For $\Pi^1_1$: Consider the statement $\psi$, which says "There are stationarily many ordinals $\alpha$ such that $2^{\alpha^+}>\alpha^{++}$". This is $\Pi^1_1$, but I claim that if a Mahlo cardinal is consistent then it is not $\Sigma^1_1$ w.r.t. inaccessibility, i.e. in the sense above. (But like in the $\Pi^1_2$ case, I don't know about w.r.t. higher large cardinal properties for $\kappa$.)
(Remark: An earlier version had a gap in the argument regarding
the value of $2^{\alpha^+}$ in $L[G]$ for singular cardinals $\alpha$.
It is filled in now.)
For suppose $\kappa$ is Mahlo, hence Mahlo in $L$. Force over $L$ to arrange that in $L[G]$, $\kappa$ is Mahlo, $2^{\alpha}\leq\alpha^{++}$ for all $\alpha<\kappa$, the set $T_{++}$ of inaccessibles $\alpha<\kappa$ such that $2^{\alpha^+}=\alpha^{++}$ is stationary, and the set $T_{+++}$ of inaccessibles $\alpha<\kappa$ such that $2^{\alpha^+}=\alpha^{+++}$ is also stationary, and $2^{\alpha^+}=\alpha^{++}$ for singular cardinals $\alpha<\kappa$. For this, first partition the inaccessibles $\alpha<\kappa$ into disjoint stationary sets $T_{++},T_{+++}$. Then force with Easton support product $\mathbb{P}$ of forcings $\mathbb{P}_\alpha$ for $\alpha\in T_{+++}$, where $\mathbb{P}_\alpha$ adds $\alpha^{+++}$ many Cohen subsets of $\alpha^+$, with conditions of size $\alpha$, in the usual way.
Claim: $\mathbb{P}$ preserves all cardinals and cofinalities,
and in $L[G]$, we have $2^{\alpha^+}=\alpha^{++}$ for all singular
cardinals $\alpha$ and all $\alpha\in T_{++}$, and $2^{\alpha^+}=\alpha^{+++}$ for all $\alpha\in T_{+++}$; therefore $L$ and $L[G]$
also have the same inaccessible cardinals $<\kappa$. Also, $\mathbb{P}$ is $\kappa$-cc, and then it follows that for every club $C\subseteq\kappa$
with $C\in L[G]$, there is a sub-club $D\subseteq C$ with $D\in L$,
and therefore $\mathbb{P}$ preserves stationarity for subsets of $\kappa$, and $\kappa$ is Mahlo in $L[G]$.
Proof: These are standard calculations, but here we go: For $\beta<\kappa$, write $\mathbb{P}\upharpoonright\beta$ for the restriction
of the product to indices $\alpha\in T_{+++}\cap\beta$, and $G\upharpoonright\beta$ for the corresponding generic, and likewise $\mathbb{P}\upharpoonright[\beta,\kappa)$ to indices $\alpha\in T_{+++}\cap[\beta,\kappa)$, etc.
So $\mathbb{P}\cong(\mathbb{P}\upharpoonright\beta)\times(\mathbb{P}\upharpoonright[\beta,\kappa))$. Note that $\mathbb{P}\upharpoonright[\beta,\kappa)$ is $(\beta+1)$-closed, so does not change $\mathcal{H}_{\beta^+}$, and in particular does not collapse $\beta$ (or $\beta^+$). Now $L[G]=L[G\upharpoonright[\beta,\kappa)][G\upharpoonright\beta]$. Suppose $\beta$ is regular in $L$. We want to see that
$\beta$ is regular in $L[G]$. If $\beta$ is inaccessible in $L$
then as the product is Easton and by GCH, $\mathbb{P}\upharpoonright\beta$ has cardinality $\beta$ in $L$ and is $\beta$-cc in $L$, and hence also has these properties in $L[G\upharpoonright[\beta,\kappa)]$ (since
these properties only depend on $\mathcal{H}_{\beta^+}$),
and therefore $\beta$ is still regular in $L[G]$. So suppose $\beta=\gamma^+$ where $\gamma$ is an $L$-cardinal. We may assume that $\mathbb{P}\upharpoonright\beta$ has cardinality $\geq\beta$ in $L$. If there is an $L$-inaccessible $\delta$ such that $\beta<(\delta^{+\omega})^L$ just
factor at $\delta$, using that $\mathbb{P}\upharpoonright\delta$ has cardinality $\delta$ in $L$ and $\Delta$-system calculations to see $\beta$ remains regular. Otherwise, we get that $\gamma$ is a singular limit of inaccessibles in $L$ and $\beta=\gamma^{+L}$ is the cardinality of $\mathbb{P}\upharpoonright\gamma$ in $L$. We may assume that $\beta$ is the least $L$-regular such that $\xi=\mathrm{cof}^{L[G]}(\beta)<\beta$. So $\xi$ is an $L$-regular and $\xi<\gamma<\beta$. But now we can factor $\mathbb{P}$ into $(\mathbb{P}\upharpoonright\xi)\times(\mathbb{P}\upharpoonright[\xi,\kappa))$. Since $\mathbb{P}\upharpoonright[\xi,\kappa)$ is $(\xi+1)$-closed in $L$,
we get $L[G\upharpoonright[\xi,\kappa)]\models$"$\mathrm{cof}(\beta)\neq\xi$",
and also by the minimality of $\beta$, all $L$-regulars $<\gamma$
are still regular in $L[G]$, hence also in $L[G\upharpoonright[\xi,\kappa)]$, and all $L$-inaccessibles $<\gamma$
are still inaccessible in both models, so $\mathbb{P}\upharpoonright\xi$
has cardinality $<\beta$ in $L$ and in $L[G\upharpoonright[\xi,\kappa)]$.
So if $\beta$ is regular in $L[G\upharpoonright[\xi,\kappa)]$,
then it is still regular in $L[G]$, a contradiction.
So there must be $\beta'\in(\xi,\beta)$ such that $\beta$ has cofinality
$\beta'$ in $L[G\upharpoonright[\xi,\kappa)]$. But then $\beta'$
is regular in $L$ and $\mathrm{cof}^{L[G]}(\beta')=\mathrm{cof}^{L[G]}(\beta)=\xi<\beta'$, contradicting the minimality of $\beta$.
So we have preservation of cardinals, cofinalities, and inaccessibles $<\kappa$; also the fact that $\mathbb{P}$ is $\kappa$-cc is as above,
so $\kappa$ remains inaccessible. It follows immediately
that for $\alpha\in T_{+++}$, $L[G]\models 2^{\alpha^+}\geq\alpha^{+++}$.
To see $L[G]\models$"$2^{\alpha^+}\leq\alpha^{+++}$" for all $\alpha<\kappa$,
and $L[G]\models$"$2^{\alpha^+}=\alpha^{++}$" for $\alpha\in T_{++}\cup S$,
where $S$ is the set of singular cardinals $<\kappa$,
use cardinality calculations and factoring as above.
(If $\gamma\in T_{++}\cup S$, then
$\mathbb{P}\upharpoonright\gamma$ has cardinality $\leq\gamma^{+L}$ in $L$, and since $\gamma\notin T_{+++}$, factoring at $\gamma$ therefore does the job.)
So $V_{\kappa+1}^{L[G]}\models\psi$. Now suppose $\psi$ is equivalent to a $\Sigma^1_1$ statement $\varphi$ w.r.t. inaccessibility,
and $\varphi=\exists A\subseteq V_\kappa\ \varrho(A)$, where $\varrho$ has only set quantifiers.
Since $L[G]\models\psi$ + "$\kappa$ is Mahlo" (hence inaccessible),
we get $V_{\kappa+1}^{L[G]}\models\varphi$, so fix a witness $A\in L[G]$.
Now force over $L[G]$ to add a club subset of $T_{++}\cup S$, with conditions $p$ being closed
subsets of $T_{++}\cup S$, ordered by extension. Note $T_{+++}$ is disjoint from $T_{++}\cup S$. It is shown in Jech/Woodin "Saturation of the closed unbounded filter
on the set of regular cardinals" that this forcing is $\kappa$-distributive, so adds no $<\kappa$-sequences (the proof is easy: for each regular cardinal $\lambda<\kappa$, there is a dense
subset of the forcing which is $\lambda$-closed: consider the set of conditions $p$ with $\sup p>\lambda$). Let $C$ be the generic club.
Then we get $V_\kappa^{L[G,C]}=V_\kappa^{L[G]}$ and $\kappa$ is inaccessible in $L[G,C]$. However, because $C\subseteq T_{++}\cup S$,
and since $V_\kappa$ was preserved, we get $L[G,C]\models$"$2^{\alpha^+}=\alpha^{++}$" for all $\alpha\in C$, and therefore $L[G,C]\models\neg\psi$.
But also because $V_\kappa$ was preserved,
$\Sigma^1_1$ truth passes upward from $L[G]$ to $L[G,C]$,
so $L[G,C]\models\varphi$. Since $\kappa$ is inaccessible in $L[G,C]$,
this is a contradiction.