Dismissal comes after months of clashes between Gallant and Israeli Prime Minister on Israel's war in Gaza.