Summary
At certain window widths, I believe that the Example: Scrolling to an element looks as if it's not working.
I noticed this when I had my browser window set to half my screen width. Since I was using 1920x1080px, my browser's pixel width at the time would have been about 960px. From my initial testing around, I believe this happens for the width range of 935px to 1023px
From what I understand, the logic behind it is working, it just so happens that the increased width of the card / parent component causes it to appear though it isn't
Page
https://react.dev/learn/manipulating-the-dom-with-refs#example-scrolling-to-an-element
Details
No response