Legnica may have been a disaster but horse archers do have a weakness, heavily armored cavalry.
They do but the Mongols had armored cavalry and don’t forget that Western armor of that period was chainmail.
As long as the armor can continue to eat arrows horse archers will be defeated eventually as proven by the Battle of Ain Jalut.
Presumably, at Ain Jalut the Mameluks had a serious numeric advantage.
The massive amount of fortifications built by European lords is another problem for the Mongols, OTL the main reason the initial Mongol invasion of Hungary failed was because the Hungarians abandoned their lands for their castles and the Mongol war machine simply could not sustain the amount of sieges even with the grazing lands of the Pannonian plain secured.
IIRC, this story about castles belongs to the second invasion and during the first one the Mongols defeated the Hungarians at Mohi. In the second invasion the Mongolian component and equipment was minimal: the invaders were predominantly the Kipchaks from Volga territories.
Taking fortified places could be, indeed, problematic (siege of Estergom) but most of the castles of that period were not huge formidable fortifications. Anyway, during the 1st invasion Batu was not planning establishing control of Pannonia: he already had as much of the grazing lands in Volga region as he could handle. His goal was to loot the easy targets, which he did. The Western campaign was a big looting raid and the following ones the same on a lesser scale.
BTW, this castles thing being quite popular, for how long would it work if the agricultural lands are being destroyed and the enemy controls them? Sooner or later the people crowded in the castles would have to go down to their fields….
But the relevant encounter was Battle of Vorskla, 1399. In it you have all: the Western knights (Polish and Teutonic) in a heavy armor, Tatars of the GH and Nogais who presumably still had armored cavalry.