Semi-plausible scenarios:
1. Huang Chao's rebellion against the Tang during the 9th Century doesn't end in a xenophobic bloodbath with the Muslims of Quanzhou, Guangzhou etc. being massacred by the rebels. Islam maintains a presence amongst the rich trading cities of China, which forms the nucleus for an Islamic dynasty later on.
2. One of the many Islamic leaders during the rebellions of the Yuan Dynasty rises to supreme power and founds an Islamic dynasty. The most famous of these leaders being Lan Yu (who OTL served Zhu Yuanzhang of the Ming).
3. Hong Xiuquan converts to Islam rather than to Christianity and instigates the Taiping Rebellion. With a larger Islamic presence in Qing China during that time, his rebellion succeeds and he founds an Islamic Empire.
Less plausible scenarios
1. Islam spreads more aggressively into Mongolia or Tibet during the 8th Century, paving the way for an Islam-dominated foreign tribe conquering significant chunks of China after the fall of the Tang.
2. During the Mongolian civil wars after the death of Mongke, have Ariq Boke defeat Kublai Khan and also suppress the emerging Chagatai Khanate. Ariq Boke refuses the 'softness' of Chinese life and rules the entire 'Yuan' realm from Central Asia. Over time this results in the Mongolians becoming Islamic.
3. Hui rebellions during the Ming and Qing dynasties result in the establishment of a new Islamic dynasty.