Infinite scroll has no direct impact on SEO because Googlebot does not scroll the page. It won't matter if you change the URL on scroll or not for crawlability, because Googlebot does not crawl that way. Googlebot loads the page, but does not interact with it at all. The bot doesn't click, scroll, hover, or otherwise interact with the page. Any page element that appears with these types of user interaction is not going to be seen by the crawler. After the page loads, Googlebot scans the document object model (DOM) for text to index and for links that it adds to the crawl queue. Googlebot is going to find your
?page=2 link in the DOM and crawl page two from that, not because it scrolled the page and saw the URL change.
For usability, changing the URL during infinite scroll makes sense. You want users to be able to bookmark or link directly to the content they are seeing. That will help SEO in the long run because you will get more links to your site and more of those links will be deep links.
In general, pagination is bad for SEO. Pages 2+ will all look very similar to Googlebot. A link to the next page does not pass much link juice to page 2 and just a small fraction of that to page 3. It is unlikely that Google will choose to index ten, let alone hundreds or thousands of pages of your pagination. Rather than having Googlebot crawl pagination, it is usually better to divide your site up into tons of categories and have Googlebot crawl pages about various subjects. I usually recommend implementing category navigation and then preventing pagination from getting crawled for better SEO.