Code quality is still a culture and prioritisation issue more than a tool issue. You can absolutely write great code using AI.
AI code review has unquestionably increased the quality of my code by helping me find bugs before they make it to production.
AI coding tools give me speed to try out more options to land on a better solution. For example, I wrote a proxy, figured out problems with that approach, and so wrote a service that could accomplish the same thing instead. Being able to get more contact with reality, and seeing how solutions actually work before committing to them, gives you a lot of information to make better decisions.
But then you still need good practices like code review, maintaining coding standards, and good project management to really keep code quality high. AI doesn’t really change that.