I mean thats what Japan has always done. I don't think there was ever a time they attacked China at its peak.
Its just they have tried several time and none of them really succeeded in the end. I believe the only major war that Japan ever won against China by itself due to military means was the first sino-japan war. Not the second coz we all know how that went.
Thats why I think one day China will have to address the Japan Question once and for all. Kinda like how the Mongol question was finally answered after countless centuries. The main change was the technology development to remove the geographical advantage.
A weak China has always been a target for surrounding countries / groups. The northern nomads for example, were a persistent threat for over 2,000 years until the advent of modern technology rendered their horses obsolete. The Japanese have a pirates mentality and will thus always be looking to prey on the weak and defenseless; laws, treaties, and agreements are all worthless in this regard.
The only lasting solution has historically been either technological (like industrial military weapons making horse archery useless) or demographic. The colonization of Manchuria by Han Chinese eliminated the Tungus as a geopolitical force in East Asia. While Xinjiang was forcibly pacified via Chinese military settlers who remain essential to the region’s stability.
It is unlikely the Japanese threat can be permanently overcome through demographics. Whole sale colonization of Japan is not something China is likely to ever do given the population size. Cultural assimilation or transformation can be attempted in the event of conquest but it also isn’t likely to succeed based on the stubborn cultural characteristics of the Japanese, which has made them somehow less Westernized than Koreans & Taiwanese despite being more thoroughly occupied by Americans.
That leaves two options. The first is technological - asymmetric weapons like nukes and biological weapons can keep the peace for a long time even if China becomes weak / internally divided. Japan won’t attempt anything as long as its home islands can be obliterated in a strike even if it becomes conventionally superior. This sort of dynamic will last until the next technological revolution.
The second is to just always stay ahead of Japan and use it as a pacing metric. The Qing failed to do this because even as the Meiji Restoration was happening, the Qing was rejecting serious reform and clinging to the old ways. Strengthening internal dynamics (like correcting any factors promoting divisions, regionalism, weak demographics, etc.) and creating a kill switch within Chinese political institutions to prevent a Qing situation from ever happening again is critical to deterring not just Japan but all the other vulture nations around China waiting for an opportunity.