You have received valid and actionable suggestions to handle your maternity leave (ML) and gratuity. However, I would suggest that you not combine the ML/Gratuity issue with your desire to rejoin the job. Look at it this way: Regardless of whether you need to pursue legal action or not, I am sure you also realize that your ML/Gratuity dues won't come without some heated discussions or interventions. When such a situation arises, do you think your job, if and when you rejoin, would proceed smoothly? Now that you also have a baby to take care of.
It's human nature to prefer the "known comfort zones" in life based on past experiences. However, often, future possibilities tend to be overlooked when making choices that will affect the future.
Based on what you have mentioned and what other members have suggested, I believe a more realistic approach would be to get your dues from this school but consider joining another school that aligns better with your personal needs.
This approach also offers another psychological advantage. As long as you entertain the idea that you may or want to return to this school, your mental state while dealing with the ML/Gratuity issues could be influenced by this expectation. By separating this aspect from the other issues, you may discover multiple options opening up for you. Give it a try.
All the best.
Regards,
TS