This is false whenever $G \ne 1$ is either a split torus or connected semisimple and absolutely simple with $Y \ne X$. By passing to generic fiber over $X$, it suffices to show that if $K'/K$ is a finite separable extension of degree $d > 1$ and $H\ne 1$ is a split $K$-torus or is connected semisimple and absolutely simple then $\operatorname R_{K'/K}(H_{K'})$ is not $K$-isomorphic to $H^d$. (It is also false in plenty of other situations, but is not worth the effort to address even more generally.)

If $H=T$ is a nontrivial split $K$-torus then the inclusion $T \hookrightarrow \operatorname R_{K'/K}(T_{K'})$ is easily seen to be the maximal $K$-split torus, yet the Weil restriction has even bigger dimension.

The semisimple and absolutely simple case is (as always) more interesting. If $\widetilde{H} \rightarrow H$ is the simply connected central cover, then the same holds for $\operatorname R_{K'/K}(\widetilde{H}_{K'}) \rightarrow \operatorname R_{K'/K}(H_{K'})$, so we may assume $H$ is simply connected.

Thus, by 6.21(ii) in Borel and Tits - Groupes Réductifs (IHES 27) (which is ultimately an application of the product structure of root data for split simple connected groups), every connected semisimple $K$-group that is *simply connected* has the form $\operatorname R_{F/K}(G)$ a unique pair $(F,G)$ up to $K$-isomorphism consisting of a nonzero finite étale $K$-algebra $F$ and a smooth affine $F$-group $G$ such that the fibers of $G$ over the factor fields of $F$ are connected semisimple, simply connected, and *absolutely simple*.

Since $H^d = \operatorname R_{F/K}(H_F)$ for $F = K^d$ and $H$ that is absolutely simple over $K$, it follows that the only way $H^d$ can be $K$-isomorphic to $\operatorname R_{K'/K}(H_{K'})$ is if $K' \simeq F = K^d$ as $K$-algebras, an absurdity since $d > 1$ and $K'$ is a field.