If you are an employee covered by the ESI Act and are eligible to receive maternity benefits from the ESI Corporation after having qualified for it through your contributions during the two contribution periods immediately preceding the date of delivery, then you should obtain it from the Corporation only. If your employer is paying your salary during your maternity leave period, it is due to the sheer ignorance of the company officials. You have mentioned that you have contributed to ESI. Yes, but the company has also contributed to ESI. If your contribution was at a rate of 0.75% of your salary, the company's contribution was at a rate of 3.25%, and the company has contributed solely to absolve itself from liability under the Maternity Benefits Act and the Workmen Compensation Act.
Section 5B of the Maternity Benefits Act
You can refer to section 5B of the Maternity Benefits Act, which states that an employee covered under the ESI Act shall be entitled to receive maternity benefits under that Act (i.e., ESI Act).
If you are insistent on receiving benefits from both the employer and the ESIC, then you can approach the ESIC.
I feel sorry for the employer due to their ignorance of the law, the objectives of the ESI Act, and the purpose of contributing to ESI.