Perspective flex repeater auto fit header

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

image