Hi there,
i think whatever method you use will cause some problems. For example this CSS:
#right-sidebar {
position: -webkit-sticky;
position: sticky;
top: 0;
}
Which will stick the sidebar to the top – it will also force the sidebar to remain in view once its about to scroll out of the viewport. Problem is there is a point where the sidebar will remain static before continuing to scroll.
So i am not sure there is a solution, aside of using the above plugin and reserving the sticky attributes to the bottom stack of widgets.