There’s that, but there is also the fact that to stay ahead the US has to spend a lot more. Whatever the US develops, militarily, China only has to spend a fraction because they only have to copy.
China likes to copy Russian stuff too, but their copies are not as good in quality as the original.