Not a popular opinion here, but I really don’t think that coding is very comparable to pure art like music or painting, and I think that a lot of these ideas come from that place(that coding is art). Coding is art like electrical work is art—there is certainly a distinction between work crafted by a master and something muddled together by an amateur, but at the end of the day it’s functional. In these trades it’s perfectly okay to have creative fatigue as long as all the parts are good. If you have great variable names, nice modular form, terse functions, excellent descriptive comments, etc, its actually better if you have a monolithic unchanging form. Pure art, that is art meant to be consumed in the form its created, by contrast, brings with it all kinds of aesthetic values that are put by the way side in coding, and novelty and creativity are front and center.
That's true for engineering, but for music it only goes so far. A lot of musicians working this way will, after a while, find a formula that repeatedly sells, but loose a lot of originality in the process.
Actually, if you are constantly working at it, you'll probably get really good at it and the quality will get better and better.
There's a story about a ceramics professor that would divide his class in two at the beginning of the semester. He would grade one group by the quality of their best piece at the end of the semester and the other group by the weight of all the pieces produced during the whole semester. The professor said that invariably, the best pieces were produced by the people in the group that was graded by the weight of their pieces. His hypothesis was that people graded by the weight would produce a lot more pieces, so in the process they would also get really good at making the pieces, whereas the people graded by their best piece would just spend too much time on their pieces trying to make them perfect and wouldn't get enough practice to actually become better at making them.