I'm using a flex repeater to generate multiple instances and flex container to header both flex repeater (for instances) and flex container (for header) display in the flex container. When generating a scrollbar then the mismatched header alignment.
for more info, I have added the below screenshot with the scrollbar and without the scrollbar.
you could use position:sticky to keep the header visible. requires a canvas tho
an easier (but uglier(?)) solution would be to use overflow-y:overlay (not supported on safari browsers or older browsers)
which cases the scrollbar to "hover above" the content instead of pushing it to the side, best combined with a little margin so it doesnt obscure the content on the edge