we’re adding a 6th fret C# note from the A7 - all the rest of the notes come from the minor pentatonic scale. Although the chord has changed to D7 here, the A minor pentatonic notes all still work.
Our A minor pentatonic ... II-V-I chord progression, which is so prevalent in the musical genres mentioned above. I would urge you to explore the harmonic minor scale across the entire guitar ...