It can't. When you have a third to 2/3 of year groups in some schools being identified as SEN it's impossible to make the adjustments required to meet every individual need.
I see many sides to this, having been a very anxious child in the late 80s who struggled with the transition to secondary and cried every day for the 1st term, had poor attendance as I'd fake illness to not go. Had I been given the option of homeschooling or just not going to school full stop, I would have taken it and then likely not ever returned. As it was, I did settle in after several months of being extremely distressed.
In adulthood I work in a field which is tied in to education and have seen the education system fail many but also seen in some cases, it make such adjustments and concessions that in my opinion the child/adolescent given such control over what they would or wouldn't do that the approach ultimately failed anyway because they were never able to become more resilient because they quickly opted out of any situation which caused uncomfortable feelings.
And there will always be some children/adolescents who just don't want to be in education regardless of how it is adjusted for them or they have such unreasonable expectations that it is unworkable.
There are no easy answers and in the meantime, teachers and schools are on their knees with ever increasing numbers of SEN children and not able to meet everyone's needs.