Here is a counterexample. Let $\mathbb G_{\rm m}$ act on $\mathbb A^2$ by $t\cdot(x,y) = (tx,t^{-1}y)$, and let $f\colon \mathbb A^2 \to \mathbb A^1$ be defined by $f(x,y) = xy$.
I am positive that when $X$ is smooth over $Y$, the fixed point scheme is also smooth; but I doubt that one can say much more, in general.
[Edit] Here is a variant. Let $\mathbb G_{\rm m}$ act on $\mathbb A^4$ by $t\cdot(x,y, z, w) = (tx,t^{-1}y,tz,t^{-1}w)$, and let $f\colon \mathbb A^4 \to \mathbb A^1$ be defined by $f(x,y) = xy + zw$.

