It is once you enter the real world of: costs (e.g. has to take N people X amount of time), resources available (may run only in a specific environment), performance requirements (has to solve the problem in a certain time), tools availables (you may have to solve it using a specific set of technologies), conventions (from coding style to required coverage to documentation), security and many other less measurable constraints (readability and maintainability) the pool of solutions to a certain problem is small, extremely small.
Coding is mostly optimizing and compromising between all those factors, rather than staring at the wall waiting for inspiration expecting the solution is an act of poetry.
This is not to say that engineering is void of creativity, some sort of beauty, cleverness, etc, it obviously is, but it's not the same kind of creativity involved when painting or writing music.
Art has the goal of touching, moving and expressing the author's self.
That's just not the goal of writing a form, a serializer, a validator, a logger, a queue, a shader or a git hook.
Tell me you don't know what knowledge it takes to compose or work on a painting without telling me. Either of those tasks that we class as art also aren't simply "staring at a wall" waiting for inspiration either.
In either case you didn't specify constraints and even with those constraints it's still technically false unless you're limiting yourself to a non-turing form of computation. I'll take all your tasks with their constraints and add no-op operations onto them to make them ugly but still functional. I'll add in all kinds of ill-thought out logic that will never be reached or is "functionally" useless.
And even an "artist" has these "real world" constraints which are "must sell before starving to death" or the work won't be "completed"
But this is literally and technically not true.