To be fair, they are winning most battles but losing the war.
They lost because of the lack of support at home. Russia, and thus Vietnam, played the 6th column perfectly, causing a loss of moral support and ground support for the fighting in Vietnam.
This is why China is so hot on wolf diplomacy. They need to sound fierce to maintain the nationalistic fervour on the ground at home. If they fail to do so, the anger and frustration from the loss of economic prosperity and domestic freedoms will rebound on the f**king old s**ts in the CCP.