Let $G$ be a topological group and let $H$ be a closed subgroup. Assume that $G \rightarrow G/H$ is a principal $H$-bundle. We have a fibration of classyifing spaces
$$G/H \rightarrow BH \rightarrow BG.$$
I am interested in the case where the associated spectral sequence degenerates and leads to an isomorphism $H^*(BH) \cong H^*(BG) \otimes H^*(G/H)$.
This holds, for instance, when $G/H$ is contractible or in the case of $G$ a compact connected Lie group, and $H$ the maximal torus on $G$.
Specifically, I am wondering if just assuming that $H^*(BH)$ is a free $H^*(BG)$-module with the structure induced by the inclusion $BH \rightarrow BG$ is enough to talk about the degeneracy of the spectral sequence. If I assume that $G$ is connected , then $BG$ is simply connected and my statement will hold under the Eilenberg-Moore spectral sequence; but I want to consider cases where $G$ is not connected.
EDIT 28/02
Looking around, I realize that maybe the Leray-Hirsch theorem might play a role here in some specific situations: if the spectral sequence collapses, and $H^*(G/H)$ is a free $R$-module, then $H^*(BH)$ is a free $H^*(BG)$-module.
Conversely, if I assume that $H^*(G/H)$ is a free $R$-module, and $H^*(BH)$ is a free $H^*(BG)$-module, does it follow that the spectral sequence collapses and that $$H^*(BH) \cong H^*(BG) \otimes H^*(G/H)?$$