Only when:
- The art isn't significantly tied to the artist's views/publicly spouted opinions/decisions/etc (e.g. if the artist is a Nazi, you can't really separate an artwork they made with a swastika from the artist. If they painted a nice flower field 10 years ago, it's hard to say that it is likely to carry any Nazi-adjacent themes, and is probably pretty distinct from whatever they'd make if they made art now)
- Consuming the art doesn't financially support the artist (so in the case of J.K Rowling, you could pirate the books, or read a copy you already have, but you can't buy new ones (or get them on loan from somewhere that could compensate her, like a library), pay to stream the movies, go to a theme park based on the work, or buy any licensed merchandise, assuming you want to not give her money and thus separate her from the work)
- Your consumption of the art won't indirectly cause someone else to benefit the artist (e.g. you wear a shirt you already own with Harry Potter on it, and it reminds someone else of the series and they buy the books)