I have a function $f$ of one variable $t$, but I will write it in a funny way: using a second function $g$ as an intermediary: $$ f(g(t),t)=tg(t) $$ where $$ g(t)=t $$ . The exact definitions of $g$ and $f$ don't matter too much, anything will do the trick. Before I proceed, note that I (knowing the definition of $g$) could write $f$ in several ways (dropping the parentheses): $$ f=tg\qquad f=t^2\qquad f=g^2\qquad f=t^3/g $$ you can see that this could go on forever.
The issue arrives when I want to take partial derivatives. Going in the same order as before: $$ \frac{\partial f}{\partial t}=g\qquad \frac{\partial f}{\partial t}=2t\qquad \frac{\partial f}{\partial t}=0\qquad \frac{\partial f}{\partial t}=3t^2/g $$ and I could do the same with partials w.r.t $g$.
Now I recognize that because $f$ is only a function of $t$, I should even be taking partials with respect to it, but by the way I defined $f$ using $g$, the multivariable chain rule: $$ \frac{df}{dt}=\frac{\partial f}{\partial g}\frac{dg}{dt}+\frac{\partial f}{\partial t} $$ still requires a definition of the partial w.r.t. $t$. It should be noted that the total derivative w.r.t. $t$ (which should be $2t$ as $f(t)=t^2$) is retrieved from the multivariable chain rule if we keep the definitions of $f$ as a function of $g$ and $t$ consistent across the equation, i.e. if we just pick a definition and stick to it, it doesn't matter one, the total derivative will work.
What's going on here, all I am doing is variable manipulations, but somehow the calculus seems intrinsically tied to the particular definitions of $f$ in terms of the dependent variable that I just made up. In a sense that is obvious. But Still.
Am I doing something I am not allowed to do. Am I miscalculating something. Am I misinterpreting something. Obviously the partials aren't well defined if the variables are not independent. But there is more to it than that.
Though this came up in the context of Lagrangian mechanics, where we regularly evaluate partials w.r.t. "functions" that solely depend on $t$ (I suspect there is something variation-y about that stuff though), the problem is easy to state, only relying on beginner-level calculus, and has me stumped. Any help is appreciated :)