Yes, it was indeed related to the browser and possibly cookies. In incognito mode and on another device, the problem disappeared. I also noticed that the swiper.js library used in my theme may interfere with this process, as it contains History API calls. Thank you very much for your help!
UPD: This was also related to the response headers, specifically Cache-Control. bfcache does not work with no-store cache-control.
This reply was modified 8 months, 1 week ago by jorikjorik.
Hello, unfortunately, this isn’t the case. I didn’t change the JavaScript. I just tested it by scrolling down the catalog, going to one of the product pages, and then going back. The product cards weren’t saved, but the scroll state was preserved. I’ll attach a video of the problem: https://drive.google.com/file/d/1ypXKlLbbnRfwpygRB8TY6u2_UMoVUyFf/view?usp=sharing