I will answer the question for the specific family of abelian surfaces as constructed by Moret-Bailly [MB]. There might be other types of examples for which the answer is different (?). We will recall the construction here:

**Lemma** [MB]. *There exists a non-isotrivial family $\mathscr A \to \mathbb P^1_{\mathbb F_q}$ of abelian surfaces.*

*Proof.* Let $E$ be a supersingular elliptic curve, so that $E$ has a finite subgroup $\alpha_p \subseteq E$. Then $E \times E$ contains $\alpha_p \times \alpha_p$, which has a family of $\alpha_p$'s inside it. Indeed, we can define the subgroup scheme $G \subseteq (\alpha_p \times \alpha_p)_{\mathbb P^1} \to \mathbb P^1$ defined by the equation $\sigma y = \tau x$, where $\sigma,\tau$ are the coordinates on $\alpha_p \times \alpha_p$ and $[x:y]$ the coordinates on $\mathbb P^1$. Define $\mathscr A$ to be the quotient $(E \times E)_{\mathbb P^1}/G$. $\square$

**Remark.** The hard part of [MB] (which we don't need) is to descend¹ a principal polarisation to $\mathscr A$, so that it comes from a family of compact type curves whose general member is smooth. This gives a non-constant map $\mathbb P^1 \to \overline{\mathcal M_2}$.

**Lemma.** *Let $\mathscr A$ as constructed above, and let $A$ be its generic fibre. Then the $\mathbb F_q(t)/\mathbb F_q$-trace of $A$ is $E \times E$.*

*Proof.* We will follow the notation of Lang [L, VIII.3]. For simplicity, write $k = \mathbb F_q$ and $K = \mathbb F_q(t)$; write $B = E \times E$, and let $\beta \colon B_K \to A$ be the surjection coming from the construction of $A$.

Let $\tau \colon A'_K \to A$ be the $K/k$-trace of $A$. Its universal property implies that the surjection $\beta \colon B_K \to A$ factors as
$$\begin{array}{ccccc} B_K & & \stackrel{\beta}\longrightarrow & & A, \\ & \underset{\!\!\!\!\!\beta'_K}\searrow & & \underset{\tau\!\!\!\!}\nearrow & \\ & & A'_K & & \end{array}$$
where the map $\beta'_K \colon B_K \to A'_K$ comes from a map $\beta' \colon B \to A'$. But $\beta$ is surjective with kernel of order $p$, and $\tau$ has finite kernel by assumption. Hence, all maps in the diagram are isogenies. Since $\beta$ has prime degree, either $\beta'$ or $\tau$ has to be an isomorphism. It can't be $\tau$, because $A$ is not defined over $k$. Thus, $E \times E$ is the $K/k$-trace of $A$. $\square$

¹Actually, [MB] has to use $G = V(\sigma y - a \tau x)$ for some $a \in \bar{\mathbb F_q}^\times$ in order to be able to descend the polarisation.

**References:**

[L] Lang, Serge, *Abelian varieties*. Springer-Verlag (1983). DOI: 10.1007/978-1-4419-8534-7. ZBL0516.14031.

[MB] Moret-Bailly, Laurent, *Familles de courbes et de variétés abeliennes sur $\mathbb P^1$, II. Exemples*. Astérisque **86** (1981), p. 125-140. ZBL0515.14007.