In the closed bosonic string we have both left and right moving sectors with modes $\alpha_m^\mu$ and $\tilde{\alpha}_m^\mu$ respectively where $m\in \mathbb{Z}$ and where we have $\alpha_0^\mu = \tilde{\alpha}_0^\mu = \frac{\ell_s}{2}p^\mu$. Now the Virasoro generators are given by
$$L_m=\frac{1}{2}\sum_{n=-\infty}^\infty \alpha_{m-n}\cdot \alpha_n,\quad \tilde{L}_m=\frac{1}{2}\sum_{n=-\infty}^\infty \alpha_{m-n}\cdot \alpha_n\tag{1}$$$$L_m=\frac{1}{2}\sum_{n=-\infty}^\infty \alpha_{m-n}\cdot \alpha_n,\quad \tilde{L}_m=\frac{1}{2}\sum_{n=-\infty}^\infty \tilde\alpha_{m-n}\cdot \tilde\alpha_n\tag{1}$$
and classically the vanishing of the energy-momentum tensor requires $L_m = \tilde{L}_m =0$. Now it is said in some references (for example Becker, Becker & Schwarz, page 40) that to get the mass formula $M^2$ for the classical closed string we need to take both left-moving and right-moving modes into account. I don't get this, my impression is that we can obtain $M^2$ from just $L_0=0$ or $\tilde{L}_0=0$. Indeed:
$$L_0 = \frac{1}{2}\sum_{n=-\infty}^\infty \alpha_{-n}\cdot \alpha_n = \frac{1}{2}\alpha_0^2+\frac{1}{2}\sum_{n=-\infty}^{-1}\alpha_{-n}\cdot \alpha_n +\frac{1}{2}\sum_{n=1}^\infty \alpha_{-n}\cdot \alpha_n=-\frac{\ell_s^2}{8}M^2+\sum_{n=1}^\infty \alpha_{-n}\cdot \alpha_n\tag{2}$$
where in the third equality we have reindexed $m =-n$ in the first sum, used that the classical variables commute and used the definition of $\alpha_0$. When we set $L_0 =0$ we are able to get $$M^2=\frac{8}{\ell_s^2}\sum_{n=1}^{\infty}\alpha_{-n}\cdot \alpha_n\tag{3}.$$
Now the same derivation in (2) with $\tilde{L}_0$ gives $$M^2=\frac{8}{\ell_s^2}\sum_{n=1}^\infty \tilde{\alpha}_{-n}\cdot \tilde{\alpha}_n\tag{4},$$
and clearly if we sum them up and divide by two we find $$M^2=\frac{4}{\ell_s^2}\sum_{n=1}^\infty \left(\alpha_{-n}\cdot \alpha_n+\tilde{\alpha}_{-n}\cdot \tilde{\alpha}_n\right)\tag{5}.$$
My impression is that we can express $M^2$ either in terms of just $\alpha_m$ as in (3), equivalently in terms of just $\tilde{\alpha}_n$ as in (4) or in terms of both as in (5). But still, as I said, some references say that for the closed string we need both $L_0=0$ and $\tilde{L}_0=0$ to derive the mass. What am I missing here? We do we need both $L_0=0$ and $\tilde{L}_0=0$ to derive the mass formula?