I suspect the functionality to "solo" bone collections (the little star icon) overrides the buttons added by the UI script... couldn't figure out why my script wasn't working like it should - but when all layers are "un-solo-ed" it works perfectly.
Yes it overrides the visible(eye icon) which is all the script does. It sets the visible to true/false.
I don't know about layout, but to add the functionality you just have to change is_visible to is_solo.
row.prop(context.active_object.data.collections["Root"], "is_visible",toggle=True, text="Root")
row.prop(context.active_object.data.collections["Root"], "is_solo",toggle=True, text="Root Solo")
Of course if you wanted to use the icon you could do something like this:
row.prop(context.active_object.data.collections["Root"], "is_visible",toggle=True, text="Root")
if context.active_object.data.collections["Root"].is_solo:
row.prop(context.active_object.data.collections["Root"], "is_solo",toggle=True, text="", icon="SOLO_ON")
else:
row.prop(context.active_object.data.collections["Root"], "is_solo",toggle=True, text="", icon="SOLO_OFF")