I’ve created the rule for particular categories, but it doesn’t work with configurable products.

You haven’t specified the category for child products of the configurable product. The categories for parent and child products should be the same.

Rate the answer?