There's a lot that can be said about method concerning how you're actually writing things so that they feel like a coherent whole, so to speak. However, I tend to think that the best way to get it how you want it is to experiment with different ways of actually writing your music. Maybe starting at bar 1 is not the best option every time, and if you have troubles with continuity perhaps you should try out some exercises to help get your groove going.
One of my favourite exercises to practice structural length and transition is to grab 4 measures from one composer and 4 measures from another and make a bridge that lasts between 10 to 15 measures, depending on how far the examples are from eachother. So for example, grab the first 4 measures from some random Beethoven sonata and some 4 measures from the middle of something from, say, Faure. Then try to bridge both things in 15 measures, see what happens.
And you keep doing this, trying out different composers/pieces until you start to "feel" how long your ideas need to be. An eye for structure is not something you're born with, you gotta work for it like everything else about composing, and I have a feeling that's where your problem lies.