You set the following exercise to your calculus class:
Q1. Differentiate $y(x) = x^x$.
A student submits the following solution:
Let $g(a)=a^x$ and $f(x)=x$. Then $y(x) = g(f(x))$, so by the chain rule, $y'(x) = f'(x) g'(f(x)) = 1 \cdot x \cdot (x^{x-1}) = x^x$.
How would you explain to the student why their solution is incorrect?
To be clear, I know why this is wrong but am interested in good ways to explain it to undergraduate or high school students.
In this question someone has problems differentiating $x^x$, but they didn't take the approach of my hypothetical student.

I would try to explain that the notation $h'$ doesn't just mean the derivative of $h$ but the derivative of $h$ with respect to some particular variable, the variable being determined by the context. In the student's answer, $y'$ is $dy/dx$, but $g'$ is $dg/da$, when what's needed is $dg/dx$.