I'm not sure this is correct. According to [1], foreigners have to pay tax on foreign income if you have live in China for 183 or more days in 6 consecutive years. And you can reset it by leaving the country for 31 or more days. However, foreigners do have to pay tax on foreign income of Chinese entities if they stay longer than 183 days.
So don't invest large amounts in dividend-paying Chinese stocks if you plan on living in China long-term, I guess.
[1] https://www.hrone.com/china-individual-income-tax-2019-impac...