For me, when I was lucid dreaming, losing concentration would break the lucidity for me.

You have to have really great concentration and focus to keep it going.

I had them randomly when I was younger, but as I got older and started meditating frequently, the lucid dreams also came more frequently.

Gain control over your mind with meditation and you'll get the concentration and control you need to have them more often and increase the length as well.