It will be because her anxiety is classed as a disability by occupational health. Her work will have a lot of hoops to jump through before they can get her anywhere near a disciplinary for her attendance or could be seen as disability discrimination. Her flexible working was most likely supported as a reasonable adjustment for her ill health, probably has adjusted sick day triggers and she will be encouraged to use her annual leave as a break from work for her health and wellbeing. I work in employee relations so seen similar cases many times before, she will think shes untouchable and probably have the union backing her but it will catch up to her as all she's doing is giving HR more evidence to support her dismissal in a capability case.