I think it's more about culture. The nation state was a concept developed in Westphalian Europe after the Thirty Years War. Traditionally, that didn't work with China which is also a fusion of the majority Han culture with dozens of minority cultures + regional cultures to the extent that the differences between someone from Shenzhen and Shanghai while both being "Han Chinese" might as well be like the differences between French and Spanish.
I think in the past there were Chinese who looked toward unity with Chinese in other countries too like Chinese-Americans, but there are now viral social media stories of Chinese-Americans bashing the PRC which doesn't go over well in China (although clearly not all of them are hostile), so those Chinese immigrants who are anti-PRC are now automatically no longer Chinese even though they're the same "race," while (Han) Chinese and minorities and foreigners who are willing to become Chinese are Chinese.
This is also emerging materialistically because cooperation with the West is not working, as the U.S. is structurally hostile to China because of different political ideologies, economic systems, social values and race, linguistics, and norms. Meanwhile, China wants to be the leader of the developing world. Therefore, Chinese nationalism emerges to create unity which allows China to compete with America. People in China will "buy Chinese" instead of American products (like the recent boycott in China of some Western brands.) Of course, there are negative and irrational aspects to nationalism as well like hotheads who promote militarism or expansionism.
Marxism can explain nationalism but it doesn't have a perfect solution to it, and there probably aren't any perfect solutions. It's almost like a natural force or a changing of the seasons and it's a global phenomenon, and it's beyond the power of any single country or state to eliminate it or pretend it doesn't exist. You can either guide it to get the advantages of it while minimizing the damages, or you can let it run out of control, or you can block it and bottle it up, but then it might just end up exploding later and much worse.