No, your AOW accumulation (Algemene Ouderdomswet - General Old Age Act) does not expire when you leave the Netherlands. AOW is a basic state pension.
As long as you have been insured in the Netherlands, you accumulate AOW rights. Each year you are insured, you build up 2% of a full AOW.
This accumulation is retained, regardless of where you live. You can view your AOW overview via Mijnpensioenoverzicht.nl.