Like may Dead songs, there are spots where the key essentially changes...at least from a lead guitar perspective. In these cases, to sound like Jerry you cannot merely play the same scale melodies throughout the song. Depending on the chord and its role in the progression, Jerry changes the scales/notes he plays to accompany. He will switch from E major on an E chord, to the minor colored B Dorian over a B minor, etc... Often the scales are related in that they share the same notes (like A major and E miloxydian)...but often they do not.
The only way I have been able to develop this ability is through repetition and ear training: listening and picking out the changes in scales. It just gets too complicated and laborious to consciously keep track of the various patterns of changing scales for every chord for me at this point. Garcia seems to favor 4 or 5 scales though:
Miloxydian, Major, Dorian, Pentatonic, Minor, come to mind immediately. His versatility is like a pro jazzman, yet his phrasing and melodies are reminiscent more popular mediums. He is a true American treasure like Gershwin and Whitman...too bad he left us so soon. I was quite accomplished at the whole pentatic/major rock thing but just got bored and quit playing guitar until I put in the effort to actually learn some theory. Folks claim it isnt nec'y but it opens up my ability to create melody---just like correct grammer helps me to articulate my thoughts through sentences.