Let $S$ be an arbitrary scheme, and let $X,Y,S'$ be $S$-schemes. EGA 1, Chap 1, 3.3, gives nice properties for products of schemes with respect to base change $S'\to S$. For example (3.3.10): There exists a canonical isomorphism $$\varphi:(X\times_SY)_{S'}\cong X_{S'}\times_{S'}Y_{S'}$$ of $S'$-schemes.
Suppose now that $X$ and $Y$ are $S$-group schemes. Then $X\times_S Y$ has the structure of an $S$-group scheme, and $X_{S'}$ has the structure of an $S'$-group scheme.
Question: Ist the canonical isomorphism $\varphi$ of $S'$-schemes in addition a morphism of $S'$-group schemes? If yes, is there a precise reference for this statement (or more generally for versions of EGA 1, Chap 1, 3.3, for $S$-group schemes)?