I have dealt with this problem in an Electron app I designed and support. The different platform scrollbar behaviors drove me mad because of my insistence on a common experience.
I really like the hidden scrollbars that Apple settled on. They are easy to identify by hovering the cursor over scroll-able content and they just act as an overlay over the content. In windows, the content is actually shifted the width of the scrollbar which is terrible for UI consistency in some cases. There is the problem that hidden scrollbars remove the "discovery" aspect of traditional scrollbars, but I find this to be a very minor loss in practice. I don't miss having a sliver of a scrollbar for large content blocks.
I ultimately just settled on styling scrollbars in CSS, making them a bit slimmer and forcing that behavior on the Mac for consistency. Scrollbars look nice, match my UI look and feel, minimally shift content and look consistent across all platforms.
I threw away all of the custom JS approaches that try to mimic Apple's solution because none were perfect and, in every case, introduced new problems that disqualified them entirely.