I'm one of those don't-code-anymore guys, but I'm not trying to promote it as "the way", it just happens to be the tool that works best for me.
I'm not sure what the difference is between your situation and mine. Many vibers try to say you're not doing it right, but I think people forget what an incredible diversity of use-cases are out there, and how many are bound to fall outside the norm. The "blame the user" attitude is irksome IMO.
I do a lot of greenfield coding. AI is easier to use in that situation - code bases are smaller and you can orient the project from the ground up. So that could be a difference.
When I take over an existing project, I have a bootstrap phase to get it working well with AI. I have the AI write a lot of documentation, and at the end of every coding session I have it update the documentation based on the code diff. When using AI to code, documentation is code to the AI, so it's important to keep it up to date, but thankfully AI can take care of that.
In the case of a bug that takes repeated attempts to get right like the sizing bug you describe, I stop and assess - ask the AI to describe the algorithm, point out that it's error prone and ask why, ask it to come up with ideas for simplifying the code. AI is amazing at insights, not so much at decision making, so I try to have it summarize and feed me information and direct it from there.
Also, feedback loops are incredibly important - the ability for the AI to self-test its work is paramount. Without that it just stabs at hard problems randomly hoping that the fix works. Nearly every difficult AI-can't-do-this problem I've worked through has involved setting up a mechanism for it to self-test.
Sometimes I do have to crack open the code to look at it, but that's increasingly rare. I can't remember the last time, TBH.
I gave up using VSC and copilot long ago, FWIW. Claude code on the command line in a sandbox and let it rip. I don't think it's possible to get the same level of automation in the VSC environment.
Dunno if this is helpful at all, and I'm not pushing you to use AI. I'll just say that that my experience with it is amazing and it's an incredible time saver. Keeps me focused on product level issues rather than micro-managing code issues.
(And, to be clear, I have no AI tools that I try to promote. Just a contractor doing work for other people.)