China cannot have it both ways. It stakes a claim on Taiwan based on the PRC being a successor government to former Chinese regimes. Whether or not that claim to being a successor government actually gives legitimacy to its claim on Taiwan is a separate question. But although the PRC claims to be a successor government of China, it refuses to pay back the international debt the former regime incurred. Here is a recent report about this issue.
The actual truth of history is that no Chinese regime has ever governed Taiwan. The last Chinese regime was the Ming Empire. It was conquered by a non-Chinese Manchu Empire that like the Mongols before ruled a vast territory encompassing many cultures including China. The Manchu Empire were the ones to establish a marginal rule over the west coast of Taiwan. But they gave up all right and claim to Taiwan in perpetuity to Japan in 1895 by an international treaty. Japan was the nation to finally conquer and unify the entire island. Japan then gave up its claim to Taiwan in the Treaty of San Francisco after World War II. But it did not designate a successor. By all international laws and the Universal Declaration of Human Rights, Taiwan belongs to the Taiwanese people and is a free and independent nation.