Sure, but that is a step from banning because it's harmful to the producer to banning because it's harmful to the consumer
Some go further still. E.g. in Australia, "laws also cover depictions of sexual acts involving people over the threshold age who are simulating or otherwise alluding to being underage, even if all those involved are of a legal age."