Let $X\rightarrow Y$ a ramified double cover of smooth projective curves, and let $$\mathcal G:=Res_{X/Y}(SL_n)$$ be the Weil restriction of the constant group scheme $SL_n$ over $X$.
Question: Is $\mathcal G$ flat over $Y$ ?
N.B: I know (c.f. Néron Models) that $\mathcal G$ is flat over $Y$ if the cover is étale.