It works, but it just hide by css the main sidebar where you don’t want to display them, the html code will still load in all pages even you specified to be loaded in just some pages.
I have a global sidebar, where I checked “Allow this sidebar to be replaced”. But, even if visually is replaced with the sidebars i created in “custom sidebar”, in source code is also visible the main sidebar that i wanted to be replaced, your plugin just add a css class “hide” to hide the main sidebar.
Anyway, i’ve fixed the problem by removing everything from the global sidebar.
What theme are you using? I have checked Custom Sidebar on Twenty Twenty theme and it doesn’t add the class “hide” to the replaced sidebar. The replaced sidebar doesn’t show at all (I mean in the code).