People can drift away from a community for many reasons.
Often they lose interest in the topic or don’t have any information to request (or exchange).
An equally likely reason is a new place emerges which satisfies those same needs quicker, with less effort, or with better results than your community (as one paper shows).
This happens most to mature, established, communities who feel their sheer size or scale negates any threats. But, as history has shown, members are happy to walk away from their connections, badges, post counts, and track record when a new thing emerges.
One option is to develop the new thing. Continually survey and interview your members to unearth new needs and satisfy them. This is an ongoing part of your strategy.
Another is to scan the environment for ‘the new thing’ and react quickly to incorporate similar features within your community. This might even mean creating something outside of your current community platform to support members wherever they may be.