Unless you're solving the same old problem for the Nth time for a new customer, you don't really understand the problem fully until you write the code.
If it's a new problem, you need to write the code so that you discover all the peculiar corner cases and understand them.
If it's the (N+M)th time, and you've been using AI to write the code for the last M times, you may find you no longer understand the problem.
Fair warning. Write the damn code.