OK, Matt, I give it a try:
Bach R.356 (D minor)
Bar1 ends with Dmin chord in first inverion (i6/3).
Bar2 starts with an A7 chord in 1st inversion followed by Dmin (V6/5 - i). After that there's an E7 in 1st inversion followed by A7 (7th added a bit later) and finally a Dmin (II6/5 - V7 - i).
Bach R.106 (A major)
Bar1: The first 3 chords are A, E6/3 and D6/3 (I - V6/3 - IV6/3). It seems to me that the fourth chord is some form of the tonic (I6/4 ?) or dominant (???), or vi in root position with a dissonant bass (I'm just guessing

).
Bar2: B7 in first inversion followed by E (7th added later in the tenor), and finally the E7 goes to A (II6/5 - V7 - I).
Conclusion:
The "II6/5 - V7 - I (i)" progression is used at cadences in both examples. I don't think it's a modulation since V7 is not a stable chord and cannot be a tonic.