The thin vertical line to the right of the scrollbar is the window’s right edge, and the dark space to the right of that is an empty portion of the window in back of the one containing the scrollbar. In the screenshot the scroll thumb seems somewhat more visible than it does in the actual window.
Now that I’m here in Tidbits I see that perhaps my question should be different, as this Tidbits window has a dark scrollbar in which the thumb is easily discernible. Both windows were created by the Arc browser application. So maybe I should be asking how to have dark scrollbars in all windows. A small sampling of different applications that have scrollbars shows some light, some dark.
As an aside, Arc is built on Google Chrome guts, so maybe it’s a Chrome/Arc thing.I tried a couple of problem web pages in Safari, and both display with only the top matter – URL bar, bookmarks, tab headers – in dark mode; the page bodies are in light mode. System Settings is set to dark. I don’t see any related settings in Safari. In Arc/Chrome I use the Dark Reader extension to get the bodies of such pages in dark mode. When the extension does its thing on problem pages, a side effect is the almost-invisible scroll thumb. I splurged $3.99 on the Noir extension for Safari, and it works there with a constrasting scroll thumb.