I came to a conclusion here by applying the Euler-Lagrange operator to the given Lagrangian:
$L^{2}=g_{ij}(x)\dot{x}^{i}\dot{x}^{j}$
Doing the algebra I find that:
$\ddot{x}^{i}+\Gamma^{i}_{jk}\dot{x}^{j}\dot{x}^{k}=\frac{dL}{ds}\dot{x}^{i} \qquad(1)$
Now, according to this webpage the condition for a vector to be transported along a curve without changing its direction is:
$\nabla_{x}V^{i}=\lambda(\tau)V^{i} \qquad (2)$
where $\nabla_x$ is the covariant derivative. Moreover, if the transported vector keeps the same magnitude, then the condition holds for $\lambda(\tau)=0$, which is only true if one chooses $\tau$ to be an affine parameter.
If I take the covariant derivative of $\dot{x}^{i}$, then:
$\nabla_{x}\dot{x}^{i}=\dot{x}^{k}\bigg(\frac{\partial \dot{x}^{i}}{\partial x^{k}}+\Gamma^{i}_{jk}\dot{x}^{j}\bigg)=\ddot{x}^{i}+\Gamma^{i}_{jk}\dot{x}^{j}\dot{x}^{k}$
which is the same as the left-hand side of the equation $(1)$. According to the parallel transport condition $(2)$, if I am choosing an affine parameter $s$, it must be true that:
$\ddot{x}^{i}+\Gamma^{i}_{jk}\dot{x}^{j}\dot{x}^{k}=0$
This is the same as equation (1) only if $\boxed{\frac{dL}{ds}=0}$.
This means that such condition for the Lagrangian must be true only if one chooses $s$ to be an affine parameter.