Do easier pieces, something that they can solve practically immediately. This is the number one solution. If they struggle to read then you need to give pieces with just finger numbers with given positions. If they struggle to practice then they must do content which they can do very easily. Humans generally enjoy doing thing they can manage with ease. You then can raise the bar slowly from there. Having to work weeks or months on a single piece is simply crazy and many times more so for the struggling student. There is no point repeating the same lessons over and over again to try and attain some kind of quality you judge is required, it just tortures you and the student. Musical maturity can come later, sometimes a student doesn't want to play a piece to your standard and has their own much lower standard. You need to be attuned to this especially with students who struggle to practice on their own effectively. Lower the bar as to what is satisfactory and move on. Some inexperienced teachers will pipe up and say "Oh but you will teach them bad habits, they will think learning a piece badly is fine etc etc". Well keep on trying to push these struggling students to playing at your high standards and they will never get anywhere and eventually will quit from boredom or the mountain of work that depresses them. You build up the students over time not expect them to jump through your hoops perfectly until they can move on, that is like torture for many students. Give your student short term goals that they must complete before they are allowed to stop. For example tell them they have to play a small passage 3 times in a row without mistake or they have to start the count again. You can pressure them in a playful manner when they are on their 2nd or 3rd attempt, tease them and say "Don't make a mistake now or you have to start again!!!" If they make a slight error you can judge whether you want to be soft and let it pass or be harder on them and say BAD LUCK START AGAIN.
Going back to as simple as it can go so the student finally realises that it is actually not as difficult as they make it out to be and all to do with them actually practicing it can be helpful. Try not to talk about them practicing but instead compliment how well they do in the lessons when they go through practice routines with you. The idea is to get them to be self responsible for their studies and that can be more easily nurtured if the work is very easy for them to manage. Kids who don't practice are utterly desensitized to being told to practice, you can show them through example how good they do when they practice, that positive reenforcement can lure them into practicing more alone. It doesn't work for all students, some just hate the piano and are forced into it so your hands are tied in that case. As piano teachers we are of course there to nurture interest in the piano in the best way possible but if the student is totally resistant and doesn't meet you some of the way it's a losing battle more often than not. Don't give up though, if their parents are willing to allow them to do things they don't totally enjoy in time you can get them around, even if that takes several years!
If the student does not practice at home, practice during lesson time. Never in a way that implies criticism or punishment for not practising, but in a manner that empowers the student with the tools for them to take initiative and practice themselves. It is not enough to tell a student to practice, one has to show the student how to practice, show the student what quality practice is all about. Take an element of the lesson, one small enough to accomplish in a single lesson, and show the student how to approach the challenges. If the student is quick to become chatty, you need to be quick on refocusing the students mind towards the task. Show the student it is possible to achieve improvement within a small amount of time, while using a disciplined focused mindset. Again, the chosen task has to be of a manageable size to complete in a single lesson, so that the student can see for themselves that they are capable of improvement, even within short periods of time.
Good to hear that you were able to make some progress with this student. At the learning stage your student is at, sometimes there are gaps in knowledge that cause confusion for the student which they remain silent about. It is by working in detail with the student, understanding their workflow and thought process that these things may come to light, as you have discovered. I had a student that had challenges with the orientation of pitch, and that higher and lower pitch means up and down in the score, but right and left on the keyboard. Your student may even be using chattyness as a coping mechanism for dealing with parts of the music that they find difficult or overwhelming. Let your student know, to inform you and keep the communication open when they find difficulties. Make it clear it is much better to deal with challenges by directly addressing them rather than attempting to distract the mind away from the challenges.