This is not an easy question to answer. It depends on your employment status during your career break, which in turn depends on whether your 'service continuity' is preserved while you are on your break.
Continuous service can be preserved if you stop working to take a career break, but only if you agree clearly and in advance with your employer that this will be the case. You should speak to your union rep if you have one, and if not, take legal advice and make sure the position is recorded clearly and in writing.
You need to consider not only the risk of losing your job during the career break but also how your years of service before the career break will be treated if you return to work after your break and are later made redundant. It is important to agree the position clearly before you take your break. Once you have taken the break, it is usually too late.
You also need to consider how your break will impact on other service-related rights and benefits such as any right to enhanced contractual maternity pay, or your occupational pension.