I've got a long address to this very question, just published last month. Here's the link: https://www.cckp.space (go to the paper "Our Minds, Our Selves: Mind, Meaning, and Machines" to download it for free).
Short take: it's a mistake to consider the product alone as the artwork. Art is a matter of a complex interaction between creator and appreciator; it necessarily involves a social context, and the values which structure social context involves sentience (feelings of pleasure and pain). Machines can, because they already do, produce "meaningful" sequences of words, notes, colors, etc. These artifacts become artworks when someone regards them as such.