With the relatively new rule that you have a chance to negate anything that is removing you from battle in Special Initiative (Foreign Sword to negate Unholy Writ or Magic Charms, etc.), you can definitely target Herod's Treachery with Sam's Edict if your opponent is discarding it to make you withdraw.
Herod Agrippa I changes things though, with his "insteading" of withdraws into CBN captures. "Insteads" make it so the original special ability never happened (if Herod's Temple "Insteads" Grapes of Wrath, there is/was no shuffle). So Gideon is never withdrawing. When he leaves battle, creating what normally would be Special Initiative, the ability making him leave battle is Herod Agrippa I capturing him, which is CBN and thus not negatable.