Let $\pi:X\to S=\operatorname{Spec } O_K$ be an arithmetic surface in the sense of Arakelov geometry. Here $K$ is a number field $\pi$ is a flat map and $X$ is a projective surface. For any coherent sheaf $\mathscr F$ on $X$ we have the determinant of cohomology: $$\det R\pi_\ast\mathscr F\in \operatorname{Pic }S$$ Moreover let $\omega_{X/S}$ be the usual dualizing sheaf. Can you please explain how can I get the following "duality formula"?

$$\det R\pi_\ast\mathscr F\cong\det R\pi_\ast\mathscr (\omega_{X/S}\otimes \mathscr F^\vee)$$

(I think one should assume also the flatness of $\mathscr F$ over $\mathscr O_S$).

Does it follow from some property of the determinant of cohomology? I've found the equation in Robin De Jong PhD thesis, I'll post it below even if I think there is a typo in the main formula: