It could be that you get too excited, so the dream ends. It could also be that you (subconsciously) think: 'I'm lucid! I should start doing fun stuff quickly before my dream suddenly ends!'. And then it does.

When you are lucid, believe that you have all the time in the world, and stabilize yourself (plus, make the dream more vivid) by rubbing your hands, staying calm, and observing and touching your environment.