Almost all the sticky sidebars, done in a smarter way than the naive position: sticky solution, use the trick where they transition from position: absolute to position: fixed and back depending on scroll. However they don't really cause layout shifts.
You can see that while scrolling whenever they sidebar gets sticky it's staying in the view and causes no real layout shift, yet it's detected as a layout shift. The readability of content isn't affected in any way, and the sidebar content is staying in view without being shifted.
I believe this should get the same treatment is using position: sticky.
Almost all the sticky sidebars, done in a smarter way than the naive position: sticky solution, use the trick where they transition from position: absolute to position: fixed and back depending on scroll. However they don't really cause layout shifts.
For example a popular sticky solution here: https://somewebmedia.github.io/hc-sticky/demo_1.html (it's the same with every solution/library out there, but I just found this example first)
You can see that while scrolling whenever they sidebar gets sticky it's staying in the view and causes no real layout shift, yet it's detected as a layout shift. The readability of content isn't affected in any way, and the sidebar content is staying in view without being shifted.
I believe this should get the same treatment is using position: sticky.