Let $K$ be a finitely generated field over $\mathbb{Q}$. Let $A$ and $B$ be abelian varieties over a field $K$, isogenous over some finite extension $L$ of $K$. I want to ask if they have the same points of good reduction.

More precisely, suppose that $S$ is a normal affine variety over $\mathbb{Q}$ with function field $K$, such that there is an abelian scheme $\mathcal{A}$ over $S$ with generic fibre $A$.

Does there exist an abelian scheme $\mathcal{B}$ over $S$ with generic fibre isomorphic to $B$, and such that the isogeny $A_L \to B_L$ extends to an isogeny $\mathcal{A} \times_S T \to \mathcal{B} \times_S T$ where $T$ is the normalisation of $S$ in $L$?

I believe that this is true if I suppose that $L=K$, as then we can extend the kernel of the isogeny to a finite subgroup scheme of $\mathcal{A}$ and form the quotient.

I ask this because the analogous statement is true if we replace $S$ by the spectrum of the ring of integers of a number field, by the NĂ©ron-Ogg-Shafarevich criterion. But I am not sure if this extends to $\dim S > 1$.