While Pressing interaction not working properly

So I have a list of items and “while pressing” state for each item.
But, when the list item has a toggle button and I press the toggle button, the “while pressing” state gets stuck and doesn’t go back to the default state unless clicked again somewhere outside.
It works fine for other list items that donot have the toggle button

Is there any solution for this please ?