For example, if I have a function which gives the radius of a circle dependant on $x$ and $y$:
$$ R[x,y]=\sqrt{x^2+y^2}.\tag{1} $$
Then its partial derivative with respect to $x$ will be
$$ \frac{\partial R[x,y]}{\partial x}=\frac{1}{\sqrt{x^2+y^2}}2x.\tag{2} $$
If I then claim that the radius is fixed to $A$, I cannot claim that the derivative is $2x/A$, because in reality, it becomes $0$:
$$ \sqrt{x^2+y^2}\equiv A \implies \frac{\partial R[x,y]}{\partial x}=\frac{\partial A}{\partial x}=0 \neq 2x/A.\tag{3} $$
Indeed, take a circle of unit radius $A=1$ for any $x \in [-1,1]$; then it's derivative with respect to $x$ within the interval $[-1,1]$ must be zero. $A$ does not vary based on $x$.
Taking the following action:
$$ S[X^\mu]=-mc \int_{\Delta \tau} \sqrt{-g_{\mu\nu} \tfrac{\partial X^\mu}{\partial \tau} \tfrac{\partial X^\nu}{\partial \tau}}d\tau.\tag{4} $$
The Euler-Lagrangian equations produce an equation which contains the square root as the denominator:
$$ \frac{1}{\sqrt{-g_{\mu\nu} \tfrac{\partial X^\mu}{\partial \tau} \tfrac{\partial X^\nu}{\partial \tau}}}.\tag{5} $$
I have seen this denominator been equated to $c$ on the grounds that it is constant. But if it is constant, how come we are allowed to take its derivative? How is this not the same situation as the example based on the circle?
If I pose $$\sqrt{-g_{\mu\nu} \tfrac{\partial X^\mu}{\partial \tau} \tfrac{\partial X^\nu}{\partial \tau}}=c,\tag{6}$$ then am I not taking the variation of $c$ and since $c$ is constant, do I not get $\delta c =0$?