The thing you are trying to achieve is counter intuitive in terms of design pattern. Let's think of the problems in SQL terms ignoring all JPA and other.
The corresponding SQL query of your JPQL looks like below
SELECT o.* FROM product o WHERE o.category = 'SOME_CAT';
Now if you pass null instead of category SOME_CAT
the SQL would be like
SELECT o.* FROM product o WHERE o.category IS NULL;
There is no SQL standard to invert the result set altering param value unless your SQL looks like following
SELECT o.* FROM product o WHERE o.category IS NOT NULL;
The similar JPQL will look like
SELECT o FROM Product o WHERE o.category <> :param
You can see that we need to invert the logical operation instead of manipulating the param. There is no standard way to achive this behavior unless you build JPQL dynamically with if else condition.
I would prefer a separate method handler one for filtering with category and other for listing all regardless of category.