Consider the function $f(x,y,z)$ where $z=g(x,y)$. If I took the partial derivative wrt $x$ what I'd end up getting would be:
$$ \dfrac{\partial f}{\partial x} = \dfrac{\partial f}{\partial x} \dfrac{\partial x}{\partial x}+\dfrac{\partial f}{\partial y} \dfrac{\partial y}{\partial x}+\dfrac{\partial f}{\partial g} \dfrac{\partial g}{\partial x} $$
$$ \dfrac{\partial f}{\partial x} = \dfrac{\partial f}{\partial x} +\dfrac{\partial f}{\partial y} \dfrac{\partial y}{\partial x}+\dfrac{\partial f}{\partial g} \dfrac{\partial g}{\partial x} $$
Well, this is quite obviously wrong, since that would imply $\dfrac{\partial f}{\partial g} \dfrac{\partial g}{\partial x} = 0$. How would I correctly express the partial derivative with respect to x in this case?
Consider the multi-variables function defined as $\quad f(X,Y,Z)$
In the particular situation where $\begin{cases} X=x \\ Y=y \\ Z=g(x,y) \end{cases} \implies \quad f\big(x,y,g(x,y)\big)=F(x,y)$
The functions $f$ and $F$ should no be confused because the first is a function of three arguments while the second is a function of two arguments. So they are not the same function. They are equal only in some particular cases of relationship between the arguments.
The chain rule leads to : $$\frac{\partial F}{\partial x}=\frac{\partial f}{\partial X}\frac{\partial X}{\partial x}+\frac{\partial f}{\partial Y}\frac{\partial Y}{\partial x}+\frac{\partial f}{\partial Z}\frac{\partial Z}{\partial x}$$
And with the particular case defined above : $\frac{\partial X}{\partial x}=1$ ; $\frac{\partial Y}{\partial x}=0$ ; $Z=g$ ; $\frac{\partial Z}{\partial x}=\frac{\partial g}{\partial x}$
$$\frac{\partial F}{\partial x}=\frac{\partial f}{\partial X}(1)+\frac{\partial f}{\partial Y}(0)+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$
$$\frac{\partial F}{\partial x}=\frac{\partial f}{\partial X}+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$
If we confuse $F$ with $f$ and if we set $X(x)=x$ writting $\frac{\partial f}{\partial x}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}\implies \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}=0$ is absurd.
Often this confusion is loosely or deliberately made in oder to simplify the writings. There is no ill consequence for experienced people who keep in mind the different meanings of the symbols. For less experienced people it is suggested to use different symbols for the functions and variables when a confusion is likely to occur.