More than 700,000 days of nursing and midwifery staff time have been lost due to mental ill health since 2020, according to figures obtained by the Scottish Liberal Democrats.