Toggling widget visibility breaks buttons?

Is it a bug or am I misunderstanding
something?

Unlikely to be a bug. Consider showing us the script.

Usually when I hear that only 1 item works out of many (or the other way round), it is caused by incorrect iteration - like getting all and applying it to the incorrect number of elements only.

Again, without you showing us what is up, we can’t help.