In short, no. Voting for a representative is never a formal cooperation with all of his positions (unless the voter happens to actually support all of those positions in his heart, which is exceedingly rare to the point I am comfortable saying it practically does not happen). One must weigh one candidate against another, and, if one must vote for one candidate because he genuinely believes greater evil will result in voting for the other, then, because he only remotely cooperates with the evil of the less bad candidate, he does not sin. The USCCB releases voter guides (See the summary from 2020) before elections. As you can see, neither major candidate aligns perfectly with Catholic teaching, and no one says that Catholics must vote third party.
A Catholic Answers article goes into detail about the different nuances in this issue. A summary is that you may vote for a pro-abortion candidate if you have proportionate cause to do so, but you may not vote for the pro-abortion candidate in support of their pro-abortion position. This is true of any public policy position a candidate has which contradicts Catholic teaching. In considering proportionality, we should consider that the USCCB has continuously stated that abortion is the pre-eminent moral issue for Catholic voters to consider. Therefore, it should be given the greatest weight in evaluating the candidates. It is a high bar to overcome for the Catholic voter (at least in America) to be truly justified in voting for the pro-abortion candidate, but at least in principle it is possible to be so justified.
In case the gravity of abortion is lost in translation, so to speak, here, we should consider another opinion on the liceity of voting for a pro-abortion candidate. Father Torraco states that abortion is a "disqualifying issue," and that Catholics may not vote for a pro-abortion candidate for this reason. However, question 10 in his FAQ offers support for the assertion that voting for a pro-abortion candidate is not necessarily formal cooperation with evil (since formal cooperation is always a sin). He says
Obviously, one of these candidates [who are all pro-abortion] is going to win the election. Thus, in this dilemma, you should do your best to judge which candidate would do the least moral harm. However, as explained in question 5 above, you should not place a candidate who is pro-capital punishment (and anti-abortion) in the same moral category as a candidate who is pro-abortion. Faced with such a set of candidates, there would be no moral dilemma, and the clear moral obligation would be to vote for the candidate who is pro-capital punishment, not necessarily because he is pro-capital punishment, but because he is anti-abortion.
It is manifestly evident that one does not formally co-operate with the wickedness of abortion in this case, therefore, voting for a pro-abortion candidate is not necessarily a formal cooperation with the evil of abortion.
Now, it is clear that abortion is not the only disqualifying issue. Euthanasia and genocide are also disqualifying issues, in the same camp as abortion. So, given the choice between a number of candidates which support these very grave disqualifying issues, and no candidate who opposes all of them, it is evident from what Father Torraco says that one ought to choose the candidate who "would do the least moral harm."
But keep in mind that very few issues are actually disqualifying. Some would try to have you believe that issues like racial equity, capital punishment (explicitly covered by Father Torraco), immigration, etc are on the same moral level as abortion. They are not. As I said, the justification for voting for a pro-abortion candidate (but not in support of his pro-abortion policies) is a very high bar. In fact I'd be willing to believe that the only comparable moral issues are euthanasia and genocide, and, possibly, religious freedom, depending on the extremity of the position (for instance, a candidate who runs on a platform that he will require all citizens to make sacrifices to Ba'al, but who is pro-life (which, if we're being historically honest, is a ridiculous scenario) might justify voting for the pro-religious-liberty candidate who also supports abortion).