If the person is adding value while not on maternity (or paternity) leave then it would be worthwhile to pay them while they are gone so they come back and continue working for you. If you don't do it, some other employer probably will, and they may choose to work for the employer with better benefits instead.