Since whether $f^*f_*\mathcal{F}\to\mathcal{F}$ is surjective is a local condition, we can check it on a cover $X$ by open subsets of the form $f^{-1}(U)$ where $U\subset Y$ is open and $f_*\mathcal{F}|_U$ is free. So it suffices to treat the case where $Y=\operatorname{Spec} R$ is affine and $f_*\mathcal{F}=\mathcal{O}_Y$.
Now let's recall some facts about the natural map $f^*f_*\mathcal{F}\to\mathcal{F}$. First, the natural map is the image of $id_{f_*\mathcal{F}}\in \operatorname{Hom}_{\mathcal{O}_Y}(f_*\mathcal{F},f_*\mathcal{F})$ under the isomorphism of $\mathcal{O}_Y(Y)=R$-modules given by the adjunction $$\operatorname{Hom}_{\mathcal{O}_Y}(f_*\mathcal{F},f_*\mathcal{F})\cong \operatorname{Hom}_{\mathcal{O}_X}(f^*f_*\mathcal{F},\mathcal{F}).$$
But since $f_*\mathcal{F}=\mathcal{O}_Y$, we have $\operatorname{Hom}_{\mathcal{O}_Y}(f_*\mathcal{F},f_*\mathcal{F})=\operatorname{Hom}_{\mathcal{O}_Y}(\mathcal{O}_Y,\mathcal{O}_Y)=\mathcal{O}_Y(Y)=R$, and $id_{f_*\mathcal{F}}=id_{\mathcal{O}_Y}=1\in R$. On the other hand, the pullback of the structure sheaf is the structure sheaf, so $\operatorname{Hom}_{\mathcal{O}_X}(f^*f_*\mathcal{F},\mathcal{F})=\operatorname{Hom}_{\mathcal{O}_X}(\mathcal{O}_X,\mathcal{F})=\mathcal{F}(X)$, so $\mathcal{F}(X)=R$. As the $R$-linear endomorphisms of $R$ are exactly given by multiplication by an element of $R$, the endomorphisms that are isomorphisms are exactly multiplication by a unit. So we see that $id_{f_*\mathcal{F}}$ must be sent to the map $\mathcal{O}_X\to\mathcal{F}$ which picks out an invertible element of $\mathcal{F}(X)$, that is, a non-vanishing global section. So $\mathcal{F}$ is trivial and the natural map $f^*f_*\mathcal{F}\to\mathcal{F}$ is an isomorphism.