This is more of an extended comment with guesses and references rather than an actual answer.
1) If in your question you ask $Y$ to be merely Kahler and not projective, then I can propose potential counter-examples. Namely, one could try to get them from Theorem 10 in https://webusers.imj-prg.fr/~claire.voisin/Articlesweb/takagifinal.pdf which is originally proven in https://webusers.imj-prg.fr/~claire.voisin/Articlesweb/hodgeimrn.pdf
This theorem answers negatively to the following question: "Are Hodge classes on compact Kahler manifolds generated over $\mathbb Q$ by
Chern classes of coherent sheaves?" The counter-examples to this question are $4$-dimensional complex tori. At the same time the answer to the question for projective manifolds is positive.
2) I wonder if some projective examples could be constructed using counter-examples to integral Hodge conjecture, constructed by Kollar. This is Theorem 14 in the first paper (above) of Voisin. It states, for example, that on a generic hypersurace of degree $125$ in $\mathbb CP^4$ the class of each curve is divisible by $5$. However there exist such hypersufaces that contain lines. I wonder if on such a hypersurface there could be a rank $2$ bundle with the class of $c_2$ equal to the class of line (or at least not divisible by 5).
Anyway, whether 1 or 2 works or not, it looks like the paper of Voisin is reasonable place to start looking for a counter-example.