I'd say 95% or more solos o r leads are pre written. Most bands don't just wing guitar solos on stage or it would be a train wreck. They are rehearsed, practiced, and played the same. Sure they may swap a few notes here and there, but on average a guitarist isn't going to rip a new solo every night on tour. That is why when you adlib it in your cover band it sounds so out of place.
You're not wrong. When I played covers, I'd master ~16 bars worth of phrases for any given song. Night to night variance would be connecting the phrases, or change the inflection, or variance in cadence... But the phrases would ultimately be the same. For many songs, I would also have another backup ~16 bars memorized, in case we needed to fill time for the singer to get back to the stage, or the crowd was jumpin' and the singer gave the nod.
The jam-band thing was where I would improvise, though securely in the confines of the CAGED methodology. So again, I had a dozen shapes to choose from, and the improv was how to connect them, the inflection, the cadence, the bends, etc.