You can check the mom website. From what i know you cannot use it to shorten the notice period but can use during your notice period. If you dont plan to serve the required notice in your company, then yes i would tink you need to pay back. I think you should consult your human resource business partner in your company.
https://www.mom.gov.sg/faq/termination/can-i-resign-after-my-maternity-leave https://www.mom.gov.sg/faq/maternity-leave/if-i-resign-while-i-m-on-maternity-leave-can-i-use-the-leave-period-to-shorten-my-resignation-notice