I believe your confusion stems from the fact that you take the given relation - $\lambda_{n} = \frac{4 L }{n}$ - as the one that completely determines the parameters of the standing wave. The given relation is a necessary relation that must hold for all standing waves for an open-closed tube (or some other 1D system with the same boundary conditions - like strings strings free at one end - ). The more general equation \ref{1} shown below is one that describes the system in a more complete way.
$$ f_{n} = \frac{\left(2 n + 1 \right) c}{4 L}, ~~~~~~~~~~~~~~~~~ n = 1, 2, \ldots \tag{1} \label{1} $$
with $f_{n}$ the frequency of the standing wave, $n$ denoting the index of the harmonic series, $c$ the speed of sound and $L$ the length of the tube. Please note that the following equation is exactly the same with $n$ belonging to a different set (the odd positive numbers).
$$ f_{n} = \frac{n c}{4 L}, ~~~~~~~~~~~~~~~~~ n = 1, 3, 5, \ldots \tag{2} \label{2} $$
Now, here it is rather obvious than when the speed of sound changes, the frequency of the standing wave also changes. This is to accommodate the change that must happen for the formation of a standing wave, which of course is given by the equation you provided (for odd $n$).
What is possibly confusing for someone here is that the relationship that must hold is independent of the speed of sound, like you mention. Nevertheless, this equation does not show "all the truth". This equation is a necessary condition that must be satisfied. If the speed of sound changes, then under those new conditions the same equation must be satisfied. For this to happen the wavelength must have a constant relation to the length of the tube.
Now, since the wavelength must be a constant value for the formation of a standing wave we could look at the relation connecting the wavelength and the speed of sound to see what is going on.
$$ c = \lambda f \tag{3} \label{3} $$
As you see, when the left hand side changes, so must the right hand side of the equation in order for the equality to hold. Since we have constrained the wavelength to be constant (necessary condition for the formation of the standing wave) what is left free to change to accommodate the necessary changes is the frequency. Thus, when the speed of sound changes, the frequency will also change to one that has the same wavelength as the previous one under the new conditions.
This shows that the relation between wavelength and the length of the tube will indeed remain constant and is independent of the speed of sound.