A HUGE part of the problems have been poor leadership in education. There are absolutely different skills and strategies in being an effective and engaging classroom teacher, and being an effective and engaging virtual teacher. These skills were not considered in many cases when deciding which teachers would do what type of education. To follow up with that very little energy and efforts were made to teach these skills, and many teachers felt like they had little to no support with learning these skills, student and parent accountability, technical troubles, or even emotional/mental health issues.
You are absolutely 100% correct when you say it's not black and white, we could have done a lot of things differently, and better, but taking the position that "closing schools was a mistake" is completely inaccurate and narrowminded.