@GeePawHill
It's a terrible thing to experience when it happens, but this is exactly my experience too.
And it's probably a variant on Fred Brook's "throw one away".
Coding is primarily a way to come to understand the problem, and so to understand what the solution/program should look like.
Once you know, the typing usually isn't the bottleneck.