a circumstantial participle of an independent subject: Latin ablative absolute, Greek genitive absolute
Idiom watch: The 'when…' clause whose subject (the general) is absent from the main clause goes ABSOLUTE — ablative in Latin (Duce interfectō), genitive in Greek (τοῦ στρατηγοῦ ἀποθανόντος). Latin uses a passive ptcp 'having been killed'; Greek prefers the active intransitive ἀποθανόντος 'having died' (ἀποθνῄσκω supplying the passive of ἀποκτείνω).
Real instances of this construction, mined from the PROIEL dependency treebanks (Herodotus · Cicero) — the model you are imitating, attested in the wild:
Authored pedagogical model answers, proofread for grammatical correctness in both languages. Not from a single source edition.