Perhaps the Qing government is finally convinced by the British allies of the Beg that a reconquest of Xinjiang is futile - in real life the British tried to do this, as an independent Kashgaria served their interests in the Great Game of Central Asia, but in the end failed to persuade Beijing that an invasion was unwise.
Perhaps Ya'qub Beg is a more realistic strategist and does not give passive and demoralizing orders such as telling his soldiers to not fire on the Chinese (in real life he perhaps foolishly believed in a diplomatic solution to the Chinese invasion). The Qing quite literally walked into Ürümchi. Contemporaneous European observers at the beginning of the reconquest believed that the Muslims would have been able to defeat the Chinese.
If Ya'qub Beg does not die of that stroke, the most realistic POD, he might be able to offer a concentrated resistance against the Chinese. In real life his rump state in the west broke apart in a three-party civil war. But then due to his poor strategy as mentioned above he might not win anyways.
But how long can this state last? It's almost inherently unstable. The regional economy plummeted, and Ya'qub's regime itself didn't represent an indigenous government. To not see Xinjiang fall back under Chinese domination Ya'qub Beg had to raise an army of 40,000 soldiers, and that's equivalent to the manpower of the Qing army in Xinjiang who had the wealth of China to feed them. How long will the population bear the required higher taxation? It was unpopular enough even in real life, and that was just seven to twelve years of Ya'qub's rule varying on the region.