Let $u$ and $v$ be two vectors with $u^2 = v^2=L$. I will show that there is an isometry taking $u$ to $v$. Specifically, I will reflect in the hyperplane orthogonal to $u-v$. Here is the computation:
Let $w = u - v$. If $w=0$, then $u=v$ and we are done, so we may assume $w \neq 0$. Reflection in $w^{\perp}$ is given by the formula $x \mapsto x - 2 \frac{\langle w,x \rangle}{\langle w,w \rangle} w.$ Since $w \neq 0$, the denominator is not $0$.
We have $\langle u,w \rangle = \langle u,u \rangle-\langle u,v \rangle = L - \langle u,v \rangle$ and $\langle w,w \rangle - \langle u,u \rangle - 2 \langle u,v \rangle + \langle v,v \rangle = 2L - 2 \langle u, v \rangle$. So $\langle u,w \rangle/ \langle w,w \rangle = 1/2$. (Challenge: Explain this formula in terms of Euclidean geometry!) Plugging into the formula for the reflection, $u \mapsto u-2 (1/2) w=u-(u-v) = v.$ Similarly, $v \mapsto u$.
Let's spell out why this means that every invariant function must be of the form $f(\langle v, v \rangle)$ for some function $f$. Let $g: \mathbb{R}^n \to \mathbb{R}$ be invariant under isometries. Define $f(x) = g(\sqrt{L}, 0,0,0, \ldots, 0)$. Then for any vector $v$ with $v^2=L$, there is an isometry taking $v$ to $(\sqrt{L},0,0,\ldots,0)$ (by the above). So $g(v) = g(\sqrt{L},0,0,0\ldots,0) = f(L)$. In short, for any invariant $g$, there is a function $f:\mathbb{R}_{+} \to \mathbb{R}$ so that $g(v) = f(v^2)$ for all $v$.