Here is an explicit example that this does not work for arbitrary resolutions. The assumptions below are only needed to get the flat morphism over the curve and they are not really necessary but make life a little easier. I think the example Karl is referring to is Hartshorne, GTM 52, Appendix B, Example 3.4.1. Anyway, here we go.
Let $Y=C\times S$ where $C$ is a smooth projective curve and $S$ is a smooth projective surface. The projection $\pi:Y\to C$ is not only flat, but smooth and projective. Assume further that there exists a morphism $\alpha: C\to S$ such that it is an embedding everywhere except at two points, whose images are the same point $P\in S$. Consider the following curves: $C_1=C\times \{P\}$,$C_2=\{(x,\alpha(x)\mid x\in C \}$. By the previous assumptions, $C_1$ and $C_2$ meet in exactly $2$ points. Now perform Hironaka's trick to produce a non-projective smooth $3$-fold: blow-up $C_1$ and $C_2$ in the two possible orders, but in different ways near the two intersection points (need to do it locally and then glue). See Hartshorne, GTM 52, Appendix B, Example 3.4.1 for details on this construction. Let $\sigma: X\to Y$ be the $3$-fold obtained this way. It is easy to see that this is not projective using intersection numbers. See Hartshorne for the computation.
Perhaps the more interesting point about this example is that it shows that a morphism being projective is not local on the target. (Like being proper is, [Hartshorne, II.4.8(f)]).
Obviously $\pi\circ\sigma$ is projective locally on $C$, since it is a combination of the original projective morphism $\pi$ and two (projective) blow-ups, but $\pi\circ\sigma$ cannot be projective, since then so would be $X$ (over the base field, since $C$ is).
Finally, to answer your question in the comments, whether there is "a" resolution that
's projective, the answer is certainly "yes". If you pick one that's a sequence of blow-ups, then the morphism is projective and hence so is $X$. In fact, using Chow's Lemma, you can "correct" any resolution that may accidentally be non-projective: by Chow's Lemma, you can always dominate birationally your non-projective (but proper) variety by a projective one and then applying a projective resolution of that will save the day.