There is no evidence as a whole to suggest international criminal law as a whole is a deterrent. Risk of prosecution or no risk of prosecution, there will always be leaders who commit horrible acts. Those who reach leadership positions where they can carry out acts that are considered to be heinous enough that they are prosecuted internationally clearly don’t believe that they will ever be brought to trial so likely consider whether or not they have immunity to be irrelevant.