فَغُلِبُوا۟ هُنَالِكَ وَٱنقَلَبُوا۟ صَٰغِرِينَ
Commentary:
This verse refers to Pharaoh’s party and not to the magicians. The latter have been spoken of in the next verse. So the words, and they returned humiliated, do not evidently apply to them. Moreover, the word (humiliated) could not have been used about men who had evinced such regard for truth as to have accepted it without even waiting to see what Pharaoh had to say about it. The word, "humiliated" has also been elsewhere used in the Quran about the disbelievers (9:29).
The word انقلبوا (they returned) does not simply mean, "they became". The expression becomes much more powerful if taken in its literal sense, the meaning being that those who, a few moments before, had come to the scene of combat with a most proud and arrogant attitude and confident of success, now returned to their places humbled and crest-fallen.
The verse seems to refer to Pharaoh’s party and not to the sorcerers. The latter have been spoken of in the next verse. The word "humiliated" could not have been used about men who had evinced such regard for truth as to have accepted it without even waiting to see what Pharaoh had to say about it. The meaning is that those, (Pharaoh and his party), who a few moments before had come to the scene of combat with a proud and arrogant attitude and were confident of success, now retired humbled and crestfallen.