Letter formation from the baseline up doesn't really sound like attention issues to me. Good that his headaches are resolving with proper corrective lenses. Did he ever get the developmental opto eval? You could have an OT look at him in terms of whether his handwriting and pencil grasp would be considered developmentally appropriate. Especially where I seem to recall that he is relatively young for grade. Is he reversing r,n,h,m? What does she mean by not the right way?

Has he tried HWOT? Or any other explicit instruction in handwriting? Or is he just doing pages of practice? You can also try the HWOT iPad app for reinforcement on conventional letter formation:
https://shopping.lwtears.com/product/CLNAPP/products-by-type


...pronounced like the long vowel and first letter of the alphabet...