Let $D$ be the unit disc in $\mathbb{C}^n$ and let $f: X \to D$ be a proper surjective holomorphic submersion, which is trivial as a smooth fiber bundle, with connected fiber $F$. We get an induced flat Gauss-Manin connection $\nabla$ on $V = R^i f_* \underline{\mathbb{C}} \otimes_{\mathbb{C}} \mathcal{O}_D$, where $\underline{\mathbb{C}}$ is the constant sheaf on $X$. $\mathcal{F} = R^i f_* \underline{\mathbb{C}}$ is a locally constant sheaf on $D$, so on an open set $U \subseteq D$ which trivializes the holomorphic vector bundle $V$, we can find sections $e_1,...,e_r$ of $\mathcal{F}(U)$ which generate $V|_U$ as an $\mathcal{O}_U$-module.
Consider a smooth $r$-form $\omega$ on $f^{-1}(U)$, such that for each $\lambda \in U$, the restriction of $\omega$ to the fiber $\pi^{-1}(\lambda)$ is a closed form. By taking the fiberwise cohomology class of $\omega$, we then get a well-defined section $\sigma$ of $\bigoplus_{\lambda \in U} H^i(f^{-1}(\lambda), \mathbb{C})$. Because the $e_i$ restrict to a $\mathbb{C}$-basis of each fiber of $\mathcal{F}$, we can uniquely write $\sigma(\lambda) = c_1(\lambda) e_1(\lambda) +...+c_r(\lambda) e_r(\lambda)$ for some functions $c_1,...,c_r$ on $U$. I think it is not hard to see that the $c_i$ are necessarily smooth.
My question is, if we further assume that $\omega$ is a holomorphic form on $U$, are the $c_i$ necessarily holomorphic? I believe I can prove this in the case that the fibers are all genus one curves (and a similar idea may work for any genus), but after trying to prove it for a bit I now believe it is false in general. But I cannot find a counterexample. What if we take $\omega$ to be holomorphic and closed on $X$?