The books do talk a bit about this:
The unsullied are field warriors and only fight well when organized in ranks and fighting with sufficient numbers. Unsullied don't do well when only a few of them are fighting together and aren't in open territory.
They can be easily "jumped" and outnumbered when alone or in small groups (as seen in the alleyway scenes).
Retirado do wiki:
Unsullied battle tactics are based on the legions of the old Ghiscari Empire, involving large groups of them fighting in lock-step phalanxes using spear and shield, though they are also trained to use shortswords for close-quarters combat. Slave-eunuchs who have been trained from birth to fight, the Unsullied are renowned for their utter discipline on the battlefield, both in their usage of incredibly coordinated large unit phalanx formations, and because they will never break in the face of overwhelming odds, even to the point of death.
Phalanx formations don't work if you don't possess sufficient numbers or are surrounded by the enemy.
It's also worth pointing out that the unsullied are poorly equipped to fight in these tight situations. They are all armed with spears, when they should be equipped with short swords for tighter situations.