for me your starting point for you to proceed should be what you have finally pointed out: "It sounds a lot better in my mind that what comes out on my strings."
This is a strong guidance for anyone who wants to be a good player on his instrument. I am quite shure, it is only a question of time, until you have closed that gap.
And I also suggest to you not to try everything at once. Take your time and pickup only one element to develop your lead work.
The most critical ones to me are:
1. the timing: slow down to the level of notes, what you are absolutely able to play fluently and in time of the beat. Playing in time is the very fundamental thing (more than playing the right notes in my eyes).
2. to take the idea of ancher points to proceed with your solos. Start with 3 (Start-middle-end) and then try to link them in a sensible way. To link ancher points can be done by repeats and variations of repeats. Find your climax in your solo: where is the point where you have reached your guitar heaven? With this way of thinking, you are buliding up your capabilities of a good musician in my eyes too.
3. Playing less notes and making stops, enables your song and your soloing more time to breath. Guitar playing immediatelly becomes more interessenting to the listener just by making pauses between the notes.
Using different scales, more techniques like vibrato, etc. is coming later.
This may sound very clarified to you, but I am not. I am still a traveller on my personal guitar journey at an early stage (that's what I feel). And the more I am playing, the more I discover new shortcomings. It is some how a like a long and winding, never ending road - but I love that trip!
All the best and good luck from a fellow sharing the same road with you, wolbai.