Realize that the 12th fret is the same note as the open string. This is called an octave. An octave is the same note at a higher or lower pitch. The 12th fret is always the same note as the string played open. The 12th fret is usually marked by two dot inlays.
Every note after the 12th fret mirrors that of the lower end of the fretboard. The 13th fret is the same note as the 1st fret, the 14th fret is the same note as the 2nd fret and so on. Draw an imaginary line at the twelfth fret so you can see that the 12th fret up is exactly the same notes as the lower part of the fretboard.
Here you can see the guitar fretboard cut in 2 pieces. Laying them side by side you can see how they match up perfectly. On the left is the open strings and first 11 frets. On the right is the 12th fret up with is the exact same notes as the first picture. You can see how the dot inlays match perfectly.
Here’s our lead pattern in the Key of F# in both octaves.