Actually, the (in)famous "sparks of general intelligence paper" about GPT-4 included tasks such as "Draw a unicorn in TikZ" which really is not that far off from this task. There were also examples for drawing cars/trucks/cats etc with SVG.
But I do think that evolutionary algorithms or MCMC variants could do a better job of this, especially if paired with an auxiliary model for scoring their intermediate results.