Listing attribute doesnt display on filter form after chosing categories

I have created a listing attribute and selected for it to display on filter form.

If I chose the attribute to apply only for certain categories, the attribute does not show anymore on filter form.

It only shows if there is no category selected, like if it is valid for all of them.

Is this a bug or am I doing something wrong?

The attribute is MODALIDADE, first image is when no category is selected specific for the attribute.

As you have set categories for the attribute then it will be shown only if a user chooses the category which you have set for the attribute