Mongolia is protected by the fact that neither Russia nor China will permit the other to control it.
This.
It's this.
Mongolia isn't independent because it declared neutrality and everyone left it alone because they're sweet, kind people who respect Mongolia's sovereignty. Mongolian government policy is to intentionally create deadlocks of influence that balance the amount of control different countries have on its politics and economy.
One example of this is the the "third neighbour" policy, whereby Mongolia deliberately seeks to ally itself with nations other than its neighbours so that they can act as a counterweight to influence those neighbours might gain. One of Mongolia's most important "third neighbours" is the USA.
Mongolia is a NATO partner. Mongolia sent troops to Iraq and Afghanistan. Mongolia signed a strategic partnership with the US in 2019, making the US the only country outside Asia to have such a partnership. Mongolia has been cited by multiple US government departments as a key economic and strategic ally in the region.
The Mongolian government isn't doing all this for fun, it is a deliberate policy to protect Mongolia's sovereignty from its neighbours.
Long term, it does seem like China will eventually be the winner in Mongolia, but it won't be easy. Anti-Chinese sentiment is really high in the Mongolian population, largely due to China's treatment of ethnic Mongolians within China.