I know that $\frac{dy'(x)}{dy}=0$ (where $y'=\frac{dy(x)}{dx}$). The reason explained is that $y'$ does not depend explicitly on $y$. But intuitively, $y'$ depends on $y$, since if you vary $y$ you will modify $y'$. Why is my reasoning wrong (my reasoning sounds like it's related to functional calculus, instead of standard calculus)?
I tried to write $\frac{dy'(x)}{dy}=\frac{d}{dy}\frac{dy}{dx}=\frac{d}{dx}\frac{dy}{dy}=\frac{d}{dx}1=0$, but this proof doesn't convince me.
I think that other way to see this is saying that if a function is of the form $f(y)$, it will not dependend on the variable $y'$. But the same way you write $f(y)=y^2$, you could write $f(y)=\frac{d}{dx}y$, which clearly depends on $y'$. So I don't know if there are some types of operations which are restricted (for example, taking limits):
Note: The problem raises in the context of Classical Mechanics, where: $\frac{\partial L(\dot{x},t)}{\partial x}=0$.
Note first that $\frac{\partial L(\dot{x},t)}{dx}$ is not the same thing as $\frac{dy'}{dy}$.
But, for the sake of argument, suppose that in the symbolic representation of $L$ you get some term like $4\dot{x}$ or something similar.
To determine why $\frac{d\dot{x}}{dx}$ would be zero, we have to look at what the definition of a derivative is.
To be straightforward, a derivative isn't about examining whether something "depends" intuitively on something. That's a casual notion used to teach the concept to first-time calculus students. Rather, the derivative is quite explicitly defined as the limit of a difference of two values of function as the change in its argument gets arbitrarily small, or, $f'(t) = \lim_{h\to 0} \frac{f(t+h)-f(t)}{h}$.
Note that this is the definition of the derivative at a point, namely $t$. This is a slightly different notion than the functional representation of the derivative, which we also write as $f'(t)$. However, considering the derivative as a function only makes sense at the values of $t$ where the derivative exists, which may be anywhere, or nowhere, or at some subset of the domain at which $f(t)$ itself exists.
That said, the functional representation of the derivative does not depend on $f$, only on $t$. The values it takes depend only on the area of the domain in which you are looking.
In other words, changing the value of $f$ doesn't induce some change the derivative -- it completely invalidates it altogether.
$\frac{d x^2}{dx}$ is not a slight change from $\frac{d x^3}{dx}$, obtained by varying the function. It is a different construction altogether.
In your case, you have a function $L(\dot{x},t)$ that depends explicitly on $\dot{x}$ and $t$. There is no dependency on $x$ itself, so by forcing a small change in the value of $x$, we do not change the value of $L$. Forcing a small change in $x$ does not mean changing $\dot{x}$ in this context, because in the definition of the derivative we're adding a small value to the independent variable. And since $\frac{d (x+c)}{dt} = \frac{dx}{dt}$, then we see that there is no change in $\dot{x}$.
(this is an edit!)