Interestingly it seems to be common for artists to try to keep perfecting their art, but very rarely is their most popular work the last one they made.
There are exceptions, notably among classical composers. Bach composed the Mass in B minor and The Art of Fugue in the last years of his life (the former completed the year before his death, the latter unfinished). They are among Bach's most complex and ambitious works, clearly made in the pursuit of artistic perfection and to eclipse all previous works (or rather, soli Deo gloria). It's debatable which of Bach's works are really most popular, but they are both up there.