Itachi broke free of Kabuto's control with the Kotoamatsukami, but he never broke free of the Edo Tensei itself (unlike what Deidara's answer suggests). This is why he could not be un-summoned (with the coffin), but was freed when the jutsu was undone.