As far as I know even Marx said so.
Marxists aren’t, or shouldn’t be, dogmatic. It’s the method that they uphold. Plus, Marx didn’t live to see the USSR, China, Cuba, etc, so it’s not possible to know whether he would maintain that position (taking your claim at face value).
Marx stated, that capitalism is a necessary step in the evolution of economy, and is better than anything before it and worse than communism. So the real question is whether he would have considered the aformentioned countries as ones that achived communism.
So what’s the best one then? Communism/ socialism didn’t do very hot either. Unless there’s been some obscure, ancient economic system that I’m not aware of, there hasn’t been a non-theoretical economic system that’s been better than capitalism yet, as flawed as it is.
I get there’s abundant evidence of the issues of the current system and the degenerate strategies it allows, but “capitalism bad haha” is getting stale.
Most of the reason socialism didn’t do well is because the United States overthrew socialist countries that elected socialism and replaced them with capitalist dictators.