these parameters cannot be returned to all selected objects using the Alt + Click method. It turns out only to uncheck everyone, but not to return it back. What is the problem, how to fix it?
In the design of Blender, if an object is hidden, it cannot be selected.
Also, if it is not selectable, you can't access its properties.
So when you disable selectability or viewport visibility for all selected objects, it automatically excludes all objects from selection.
Somehow the "active" selected object (yellow dot in the viewport) is still selected, explaining why you still can toggle its visibility or selectability.
In short, this is Blender's developers team design decision and you can't change it easily.
I suggest you use the outliner and collections for this behaviour :