I was going to write a comment: What Thomas Rot said plus "the pullback along the inclusion $V\times F\to U\times F$ commutes with the Künneth-isomorphism".
This however deserves some explanations.
Note that
- We can choose an isomorphism $\varphi\colon \pi^{-1}U\to U\times F$ which is compatible with $\pi$. (More precisely, $\varphi$ shall factorise $\pi|_{\pi^{-1}U}$ over the canonical projection $U\times F\to U$.) In particular, under $\varphi$ the inclusion $\pi^{-1}V\subset\pi^{-1}U$ corresponds to $V\times F\subset U\times F$.
Thus, we can reduce the problem to the case where $\pi$ is the projection $U\times F\to U$.
- The inclusion $V\to U$ induces isomorphisms on cohomology groups, simply because if they're both contractible, all these groups are trivial except $H^0$, but this case is easy.
(I don't know what kind of cohomology you want to use; I've read De Rham somewhere, that's fine. I'm not going to use it explicitly anyway, but let's say we have coefficients in a field if you want to use something like singular cohomology instead.)
Now finally we can see that pull back is in fact an isomorphism. From the projections $U\times F \to U$ and $U\times F\to F$, we get homomorphisms $H^*(U)\to H^*(U\times F)$ and $ H^*(F)\to H^*(U\times F)$ respectively (and likewise for $V$).
Using these, for each $k,l$ with $n = k+l$ we get a homomorphism $H^k(U)\otimes H^l(F)\to H^n(U\times F)$ and likewise for $V$ and it is easy to see that these maps make the diagram
$$\require{AMScd}
\begin{CD}
H^k(V)\otimes H^l(F) @>>{i^*\otimes \mathrm{id}}> H^k(U)\otimes H^l(F)\\
@VVV @VVV \\
H^n(V\times F) @>{j^*}>> H^n(U\times F)
\end{CD}
$$
commute, where $i$ and $j$ are the canonical inclusions.
By our second note, the above horizontal map is an isomorphism, and so is the sum of all of them, $$\bigoplus_{k+l = n}H^k(V)\otimes H^l(F) \to \bigoplus_{k+l = n}H^k(U)\otimes H^l(F).$$
(On both sides, all but one of the summands is trivial, where the non-trivial ones are $H^0(V)\otimes H^n(F)\cong H^n(F)\cong H^0(U)\otimes H^n(F)$.)
To the very end, by the Künneth theorem, the vertical homomorphisms in the commutative diagram
$$\require{AMScd}
\begin{CD}
\bigoplus_{k+l = n}H^k(V)\otimes H^l(F) @>{}>> \bigoplus_{k+l = n}H^k(U)\otimes H^l(F)\\
@VVV @VVV \\
H^n(V\times F) @>{}>> H^n(U\times F)
\end{CD}
$$
are also isomorphisms. Hence so is the bottom map and this is what we wanted to prove.