No head of state was successfully prosecuted by a partially international court until Charles Taylor was convicted by the hybrid Special Court for Sierra Leone, the first to go on trial was in 1994. None of the post WW2 Allied trials featured a significant head of state; Hitler was dead and the entire Japanese imperial family was not charged, including emperor Hirohito, who continued serving as Japanese head of state until his death in 1989.  The charges against Doenitz all pertained to his actions prior to him taking the leadership of Germany so they cannot be said to be actions taken in the role of head of state.