Code is shared with explicit licensing. Art exists in a more vague space, where the line between stealing and influence is subjective.
If your code is released with no license, it should be fair to assume free use. But if it is licensed, tools like Copilot should be forced to respect that.