I know nothing of Khwarezmi internal history, but...
WI, at the time Temujin demands vassalage, Khwarezm is embroiled in a succession crisis? Say there is a child heir, a greedy regent, an intriguing vizier, and an usurping uncle (IOW, the usual suspects). One player (A) invites Mongol intervention in return for pledging vassalage. Temujin sends a tumen under Subutai, which annihilates the B side in action. A and his cronies decide they should be really nice to the Mongols; the surviving B siders agree.
Subutai goes home laden with tribute, while Urgenj is not sacked and destroyed. Khwarezm remains politically shaky for the next 20 years, with its leadership dependent on Mongol support, which they pay for, heavily. (This is unpopular, but when a hothead talks of "breaking the Mongol yoke", some old fellow will ask "Were you at Ulus River? No? Then shut up.")
Also, though, Khwarezm provides auxiliaries for Mongol operations in the Middle East and Russia. Some conquered territory is awarded to the Shahs, so the alliance is somewhat rewarding. After a generation or so, Khwarezm is largely integrated into the Mongol empire, but as a vassal state/ally, not a conquered realm. Khwarezm's armies learn Mongol methods, and the Shahs become players in Mongol politics. (The next two Shahs are strong, able men.) There is intermarriage between the Shahs and the Great Khanate; the tribute is reduced or forgiven.
Circa 1300: a dispute between the Il-Khan and the Golden Horde gets violent. Khwarezm supports the Horde, which is backed by the (very distant) Great Khan. Khwarezmi troops even defeat a (badly led, heavily outnumbered) Il-Khanid tumen. The Horde wins, and Khwarezm gets some Il-Khanid territory.
Later still, Khwarezm intervenes in an Il-Khanid succession dispute, and actually places a puppet on the Il-Khanid throne. This doesn't last, but the Il-Khanid state breaks up, with the Mamluks and Ottomans tearing off pieces in the west, and Arab and Persian rebels seizing the core. Khwarezm allies with Muscovy to defeat the Golden Horde. The "Great" Khan is busy in China and has lost any real authority west of Xinjiang.
Circa 1350-1400, China overthrows the Great Khan, but Khwarezm is not affected, except to regain formal independence. The Shah even claims the title of Great Khan, based on descent from Mongol princesses, but it means nothing.
Thus Khwarezm survives the Mongol age as an organized state. Later Middle Asian history is left as an exercise for the student.