In Bott and Tu's *Differential forms in algebraic topology* there is a proof of Leray-Hirsch for the De Rham cohomology. The theorem is this:

Theorem(Leray-Hirsch): Let $E$ be a fiber bundle over $M$ with fiber $F$. Suppose that $M$ has a finite good cover. If there are global cohomology classes $e_1, > \ldots, e_r$ on $E$ which when restricted to each fiber freely generate the cohomology of the fiber, then $H^*(E)$ is a free module over $H^*(M)$ with basis $\{e_1, \ldots, e_r\}$, i.e. $$ H^*(E) = H^*(M) \otimes \mathbb{R}\{e_1, \ldots, e_r\}.$$

Does the same formula apply for sheaf cohomology in general? Or at least for some "good" sheaves like the sheaf of smooth functions or holomorphic functions? I am asking this because I know that Leray-Hirsch theorem is a very particular case of Leray spectral sequence which is valid for sheaf cohomology in general. But I do not know how to prove that the spectral sequence degenerates at the $E_2$ term.

If the formula applies to the general case, why does the spectral sequence degenerates at the $E_2$ term? References for this results would be greatly appreciated.