Then don't ask it to write code? If you ask any recent high quality model to discuss options, tradeoffs, design constraints, refine specs it will do it for you until you're sick and tired of it finding real edge cases and alternatives. Ask for just code and you'll get just code.
Claude has a mode specifically for what you're talking about, it is actually very good (Opus 4.5) at planning and going through design without coding, it's called planning mode.
Listen, if you aren't constantly shift-tab or esc-esc during complex problems, and then struggling when it isn't working for you, rtfm, you'll get further and better results.