Most payslips include a "Year To Date" figure which is how much you've earned since the first of July of the current financial year. It's a very simply calculation to extrapolate this into an annualised salary figure.
If you take leave without pay, your YTD annualised salary will be lower. Lenders will at a minimum ask questions about the discrepancy. If the reason was something like maternity leave (which tends to be a once-off) it's not a big deal. If it's simply by choice, it will likely affect the outcome of the application.
Best to be upfront about it, you'll get a more favourable outcome if you allow them to dig a little deeper into the details.