We prove a Tannakian form of Drinfeld's lemma for isocrystals on a variety over a finite field, equipped with actions of partial Frobenius operators. This provides an intermediate step towards transferring V. Lafforgue's work on the Langlands correspondence over function fields from $\ell$-adic to $p$-adic coefficients. We also discuss a motivic variant and a local variant of Drinfeld's lemma.