Enrollment had been declining for years, but the pandemic worsened the situation.