An employee will be encashing or carrying forward her earned leave only. That right is not denied only because she has had 6 months of maternity leave. Maternity leave is a separate kind of leave meant for a particular purpose and cannot be used for other purposes. At the same time, earned leave is leave earned by working for certain days and can be availed/utilized for any purpose or carried forward to the succeeding year, or encashed subject to conditions as per the contract of employment or standing orders. If a woman employee has earned leave to her credit, she can very well encash it or carry it forward even if she had 6 months of maternity leave.
Please note that earned leave is leave earned by means of being physically present for work. Though through work eligibility, the days an employee remains on authorized leave will be considered days worked, for these leave days, she/he will not earn any leave. Naturally, a woman employee who was on maternity leave for six months in the preceding year, say, 2021, shall get only a very small amount of earned leave in 2022, i.e., leave proportionate to the days she was physically present in 2021.