I wouldn’t say this alone indicates China is ahead. Chinese economic growth is truly the key here. Technological capabilities are trivial if you have dramatically more resources than your competitors.
There's nothing in this project the US could not easily do, and the US still has more resources than China. China is just more willing to allocate those resource to this type of project. Undoubtably the military applications had only made the choice to allocate funding even easily. The US has other more pressing issues and allocating billions of dollars to clean up space isn't appealing to the majority of voters.
In the US any NASA project is and will be hampered by competing states wanting the resulting jobs coming to their own cities. China might be behind the US for now in space race and many science fields but the trajectory they are moving at they are likely to get ahead. I do wonder sometimes if the creationist and other such bullshit anti science getting larger support in the US might be a well a financed trojan horse.
...by GDP, which is absolutely not a representation of economic resources, especially with how USA calculates GDP.
China has something like >1000% as many people working in technical industry jobs as USA, and a massive trade surplus. The two economies are not even comparable. One prints the global reserve currency and smears it around in FIRE, the other makes things.