Soviet Russia had a rather different trajectory than China. By the 1917 Russia had significant ties with Europe, which helped both economically and scientifically. Having good pre-revolution scientific schools helped to maintain the lead in hard sciences - military tech like planes and artillery. Then achievements were also demonstrated in rockets and space (up to orbital stations), nuclear area (competing program for nuclear power plants, thermonuclear weaponry, particle accelerators), quantum physics (e.g. lasers), computers and material science (friction welding and Al-Li alloys come to mind as examples).
It could be possible to maintain lower level of life comfort while keeping the "academic part" competitive, if the world outside USSR wouldn't demonstrate that a better life is possible. So, I think for some time USSR could maintain the lead, which it did, but then it wasn't enough.
China has tremendous advantage in number of people - 4x compared to USSR - and way better economical system, but disadvantage in scientific schools traditions (which it tries - up to a point - to improve) and similar problems with freedoms. Improving scientific level takes time and may lead to conflicts with societal limitations. China may have some years - or even decades - before such problems will become critical.