Clause 2, Article 12 of Circular 59/2015/TT-BLDTBXH stipulates as follows:
Maternity benefits
...
2. The period of maternity leave of 14 working days or more in a month is counted as the period of social insurance payment prescribed in Clause 2, Article 39 of the Law on Social Insurance, which is instructed as follows:
a) In case the labor contract expires during the time the employee's leave is entitled to maternity benefits, the time of maternity benefits from the time of leave to work until the labor contract expires is calculated as the time of social insurance payment, the maternity benefit time after the expiry of the labor contract is not counted as the time of social insurance payment.
b) The period of enjoying maternity benefits of employees who terminate their labor contracts, work contracts or quit their jobs before giving birth or adopting children under 6 months old as prescribed in Clause 4, Article 31 of the Law on Social Insurance shall not be counted as the period of social insurance payment.
...
Accordingly, if the contract expires during maternity leave, employees will still be entitled to social insurance from the time of maternity leave until the labor contract expires.
The period of maternity benefits after the contract expires will not be counted in the period of social insurance participation.