Can’t play G major pentatonic over D?
The G major pentatonic scale contains the 1, minor 2, 4th, 5th, AND the minor 6th of D.
You’re already creating the F# tension playing the D Major chord. The F# is playing THE WHOLE TIME and creates different tensions under certain notes.
D isn’t in the C...