It is hard to stop from waking up. The main thing is to stay relaxed which is difficult when you are lucid and worried that you are going to wake up. Try repeating something like "I will stay asleep" or spinning in circles in your dream.

I'm always surprised at how well spinning works for getting you back into a dream or changing scenery.