Calling .scrollIntoView() directly on Polaris web component elements has no effect. This was tested with <s-section>, <s-stack>, and <s-box>.
Example
<s-page>
<s-button onClick={() => { document.getElementById('test')?.scrollIntoView() }}>
Scroll to element
</s-button>
<s-box background="strong" blockSize="100%" />
<s-section id="test">
Test
</s-section>
</s-page>
Expected Behavior
Calling scrollIntoView() on the Polaris element scrolls the page to bring it into view.
Actual Behavior
Nothing happens. The scroll position does not change.
Workaround
Wrapping the component in a standard <div> and calling scrollIntoView() on that div works as expected:
<s-page>
<s-button onClick={() => { document.getElementById('test')?.scrollIntoView() }}>
Scroll to element
</s-button>
<div id="test">
<s-section>
Test
</s-section>
</div>
</s-page>