This is the last and most awkward of the Standard Riff positions.
2nd Blues Position, Key of G
It’s not possible to play any of the riffs without going out of position.
When you use this position, focus on the tonic on the 4th string and play around in that position for a while.
Find where the tonics of IV and V are and also try to locate their respective major thirds.
Those are the notes to aim for when you’re following the chords.