Some probably did escape on horseback. However, there would have been many more horses and donkeys than men because some of the beast of burden would have been used to carry equipment.
Thus, I presume it was mostly these beasts of burden - equipment carrying animals that remained.
However, the fact that the mean fled in such panic means that some would have been on foot as well because, by definition, when a person is in panic, they become irrational and do not think clearly, thus some may have ran on foot even though they might have had a horse available.
Note the comments of Benson:
2 Kings 7:7. Wherefore they arose and fled — And that with incredible
precipitation, as for their lives, leaving their camp as it was, and
even their horses, which, if they had taken them, might have expedited
their flight. None of them had so much sense as to send scouts to
discover the supposed enemy, much less courage enough to face them.
God can, when he pleases, dispirit the boldest, and make the stoutest
hearts to tremble. They that will not fear God, he can make them fear
at the shaking of a leaf. Perhaps Gehazi was one of these lepers,
which might occasion his being taken notice of by the king, chap. 2
Kings 8:4.
Similarly, the Pulpit commentary:
And left their tents, and their horses, and their asses, even the camp
as it was. Partly, perhaps, in mere panic; partly to induce a belief
on the part of the enemy that they had not quitted their camp. So
Darius Hystaspis, when he began his retreat from Scythia (Herod.,
4:135), left his camp standing, and the camp fires lighted, and the
asses tethered (see ver. 10), that the Scythians, seeing the tents and
hearing the noise of the animals, might be fully persuaded that his
troops were still in the same place. Asses were the chief
baggage-animals in many ancient armies. And fled for their life.
Thinking that, if they waited till dawn, the Israelite allies,
Hittites and Egyptians, would exterminate them. 2 Kings 7:7