A few of the questions asked about "illegal immigration"--they are the red dots. Republicans generally do better on the illegal immigration questions, but there aren't enough to say much about the trend. For the general immigration question, Republicans had a big advantage the first two times it was asked (1996 and early 2002), but the Democrats generally had an advantage from 2005 on. Their average was +3 under Bush, +1 under Obama, and +8 under Trump. The general immigration question was asked twelve times during the Trump administration, and the Democrats led every time. That changed under Biden: Republicans led all four times the question was asked, and in 2022 and 2023 the Republican lead was about as big as it had been in 1996 and 2002. Back in 2017, I said that a majority was in favor of letting unauthorized immigrants who were currently here stay and possibly obtain citizenship, but also in favor of stronger efforts to prevent further illegal immigration. That may help to explain the change under Biden: a "path to citizenship" had been a major issue under Obama and Bush, but disappeared under Biden since it was clear that Republicans wouldn't cooperate. That meant that attention was focused on the border, where the Republicans had the advantage. But that's not the whole story: in 2022 and 2023, the Democratic disadvantage on "immigration" was bigger than their disadvantage of "illegal immigration" had been ten years earlier.
[Data from the Roper Center for Public Opinion Research]