Cant select/deselect Checkbox after setItemEnabledProvider

I have problem with setting setItemEnabledProvider for my checkboxGroup. I wanted to disable some checkboxfrom group so i used:

				checkbox.setItemEnabledProvider(item ->  !ids.contains(item.getId()));

After this code i cant select or deselect any enabled checkbox manually and programmatically. Before this method all selections in code are working as excpected. Plus after this i cannot select disabled checkboxes, i can only do it before they are disabled.
ids is the list with checkboxs ids that i want to disablce like [0,9,13]

It is wokrnig fine until i have one of the disabled checkboxes selected.