Try to make being above your gear natural and spend any time in that state very consciously. What I mean by that:
- When above your gear in an easy section (or good rest), remind yourself/be aware that you're above your gear. Space out placements more. Don't just cruise through the easier sections - take the time to practice jams & locks, even if face holds are available. See how you feel on a finger lock above gear. Realize it's doesn't have to be an alarming prospect, and might even be pretty stable.
- If you get to a rest, don't rush to put a piece in, even if you eventually will. Shake out. Grab some chalk. Take the time to analyse what's above. Would it be better to draw from the left or right to keep your rack balanced? If you can choose, should you try to get ride of a particular size, or save some. Then place some gear. Teach yourself that chilling out above gear is perfectly normal.
==================
The thing about committing to sequences onsight & on gear though is that you should also be prepared to back down, if need be. Sometimes the smart thing to do is to let go. I recommend you set yourself some sort of philosophy/code. Mine is that I can keep going as long as I would be OK taking the fall. If I can't say I would, then I should either take it right then or down climb or find a piece now. Sometimes the answer is " I won't fall here". That's good as well. But I can see myself falling in this section and I'm not comfortable with the fall I would be taking (shitty gear/too high / ledge) and yet I keep going, I'm making a bad call, at least in my book.
Because you don't know what's coming - maybe the next good gear IS pretty far. Maybe you don't have the right piece for the next placement. Maybe the next placement is tricky and you're unlikely to find it. Maybe it's doesn't feel hard for others, but will for you (finger/hand sizes etc.). That's the tricky bit about onsight/flash.
EDIT:
I've recently decided to finish most of my gym climb with a fall, instead of clipping the anchor/top draw. The point for me is that falling (e.g. the fall itself, or its prospect) should be an integral part of climbing. I want to be able, as much as possible, to make the judgment about my climb without it being partly about the uneasy feeling one gets when accelerating downward at 9.8 m/s^2.