It's a complicated issue. You can perhaps argue both ways. For example, one could say space race definitely didn't end with the Moon landings. Even though there was 1975 Apollo-Soyuz flight, the technology and science went ahead - the whole epoch of space stations, winged spacecrafts, automatic probes and commercial projects happened after "the small step for man".
USSR did have less resources to dedicate to space. USA spent massively more on the Moon race - and while the technology was somewhat conservative in places, they reached the goal. The close call of Apollo-13 could illustrate both how stretched the resources were and how sufficient level of redundancy was. USA won the Moon landing, even though USSR claimed many secondary prizes - Zond flights, automatic orbiting, landing, Lunokhods and probe returns. Even though Luna-24 clearly brought important materials, still the scientific return from - massively more expensive - Apollo flights could be considered higher. Yet USSR spent maybe 1/5 of what USA spent on the Moon race.
Space stations are also somewhat hard to compare. While USSR had much more, and with better capabilities, the Skylab's heritage is still important - even today. Same goes to Shuttle/Buran - while Buran flew just one, rather symbolic flight, and Shuttle run a massive scientific (and others) program, still Energiya-Buran project produced Zenit launcher, family of engines leading to e.g. RD-180, not to mention the development of underlying technologies - e.g. Al-Li alloys and (I believe) friction welding were worked on in the scope of the project. Shuttle can be accused in killing two crews and in being excessively expensive. Buran can be accused in helping to bankrupt the USSR.
USSR had quite good automatic probes at the time of breaking, too. VEGA program was a resounding success, while Phobos was much less so - even though quite ambitious. Only pieces of those capabilities survived - post-Soviet Russia managed to participate well in commercial launch market and practically created space tourism industry, but seems like it works well only initially, and serious investments are hard to come by. Yet coming back to USSR it's hard to disagree that the space program - till the end of the country - was quite robust, despite the loss of the Moon race.
We can still consider the manned Moon flights as the biggest achievement in the manned space. But going back to USSR/USA comparison - we aren't even sure if USA is able to repeat them easily (USA can, but with lots of efforts, which modern programs demonstrate), which shows importance of political will. So it looks like there were different "kinds of sport" and participants showed different results in them, and if we assume that only Moon landings matter, then USA is the clear winner. The reality is probably more complex.