This question is about the formal smoothness property for schemes. A morphism $X\to S$ is formally smooth if for every affine $S$-scheme $Y$ and every subscheme $Y_0\subset Y$ cut out by a nilpotent ideal, morphisms $Y_0\to X$ always extend to $Y\to X$. (Here all morphisms are $S$-morphisms.)

Let's suppose $f\colon X'\to X$ is an $S$-morphism between schemes which are each formally smooth over $S$. Say we have a commutative diagram of $S$-schemes $$ \begin{array}{ccc} Y_0' &\to & Y_0 \\ \downarrow & & \downarrow\\ Y' &\to & Y \end{array} $$ with $Y_0$ and $Y_0'$ cut out by nilpotent ideals, and another commutative diagram $$ \begin{array}{ccc} Y_0' &\to & Y_0 \\ \downarrow & & \downarrow\\ X' &\to & X \end{array}. $$ Since $X\to S$ is formally smooth, the morphism $Y_0\to X$ extends to a morphism $Y\to X$. My question is, does the morphism $Y_0'\to X'$ extend to a morphism $Y'\to X'$ in such a way that $$ \begin{array}{ccc} Y' &\to & Y \\ \downarrow & & \downarrow\\ X' &\to & X \end{array} $$ commutes?

I'm currently thinking not, because (in the absence of further assumptions) you don't have any control over the way these morphisms lift. Am I overlooking something simple?