This probably only happens if you enter some data into patron attributes and then later limit entry of that attribute by category. I have a patron who has data stored in an attribute, but that attribute has since been limited to another patron category. Even though the data exists I don't think it should display if it no longer applies to that patron category. Otherwise you can see patron attributes displayed on a record which cannot be edited because the editor honors the limitation by category.
I could be quite easy to hide them, but they will still be searchable. To remove them from the patron search would be much more tricky. Maybe an easier way would be to provide a script to remove the attributes which should not be set for a patron.
This bug still exists in 22.11 To Replicate: 1. Create two patrons, Patron A and Patron B in two different patron categories. 2. Create a patron attribute. Select Display in OPAC, Editable in OPAC, and limit the attribute to the patron category assigned to Patron A. 3. Edit Patron A to have the patron attribute. 4. Login to the OPAC with Patron B's account. See the patron attribute is displayed and editable to patron B. The expected behavior is that Patron B would not see or be able to edit the patron attribute because they are in a different patron category.