From my Eastern EU perspective attendance (and performance) is easy to fix.
Make schools free, but mandatory. Make it mandatory for the student to finish school. If a student does not pass the test for at least 50% level in ALL classes, then he automatically stays in that class for the second year. Key tests are centralized and secret - every pupils of every school take the same test at the same time and all results are graded by teachers in other randomly chosen schools (to prevent cheating and grade boosting) the content of the tests is top secret so that no teacher can prepare their students specifically for that test. That is step one - establish a fair, but strict testing system that ensures that if a child is in a grade, he deserves to be there.
Every teacher must know all their students and take attendance every time. If a student is not in class, he must bring a doctors note or a parents note (if he is away less than 4 days in a row). If there is no excuse for being late, the parents are summoned to school so that they can excuse him or punish him at their choice. However if parents do not show up, then child protective services are engaged and child is removed from their parents for neglect and is forced to live at the school.
In any case everyone must be forced to go to school until they graduate for merit (or at least until they are 21 and declared mentally challenged). if you are too stupid to graduate from school, you are too stupid to drive, vote or take government office. One can regain those privileges by continuing his education (for free) until he graduates.
No home schooling, private schools must obey the same testing and attendance laws.