Check if your element is inside a `position: fixed` or `transform` parent. Those can break js scroll into view because they create new stacking contexts.
If that’s the case, you might need to scroll the parent container instead of the window.
If that’s the case, you might need to scroll the parent container instead of the window.
