Not service notice period as a school teacher due to family emergency.

So I was working for an organisation from July 2022 , till May 2023 . We had summer vacations, I had to join in July as the school reopens in July 19th. Now I got a call from my in laws who are in their 80ies that they are hospitalised and we need to be there. As soon as we got to know , we had decided to relocate and I offered by resignation on 30th June , the HR was super rude , showed no empathy and her reply was pay for 3 months and leave . I said ma’am there is some medical emergency . I said please don’t pay me June’s salary and I will also pay for the workshop I have done in April. She did not consider this ! Now she has sent me a legal notice on behalf of the school and I have also replied after consulting a lawyer . The contract says I can’t leave in any event unless disability, my lawyer has clearly specified that since my in laws are senior citizens , their disability is also my disability. We had shifted for 3 months , I have all medical bills, my sons admission to the school in a new state , movers and packers bill , society clearance ,everything . Luckily things got better and we decided to shift back. I went to the school if they want me to complete the notice period against any post and provide with a relieving letter. The Director and the Principal agreed but the HR did not . She sent me a legal notice and my lawyer replied to that . Acc to my lawyer there is no breach of contract. Now the HR is asking for settlement and asked me to pay 70 percent of 3 month’s salary. I am totally against paying as I was a family emergency!