BartK The key signature of A major corresponds to B Dorian. Go check it out! Play a scale B-C#-D-E-F#-G#-A-B. It sounds the same as D-E-F-G-A-B-C-D.
I wrote some gobbledygook while figuring out what happened.
What you're trying to say is how I learned modes first: Dorian is 2nd degree to 2nd degree of a major scale. When you originally wrote:
BartK .... play all the white notes from D to D.
my goldfish mind shifted from B to D and I was in some hybrid world between the two. D Dorian doesn't have G# in it, but it also doesn't have F# in it. Somewhere in there I lost the plot. I wouldn't want to think about D and B at the same time, though I know why you went that direction.
I did originally learn the "2nd degree to 2nd degree", where D to D white keys was the go-to for perceiving the intervals. It's still a handy reference. If I used that method, I'd be playing A major but starting on the 2nd note. I would not think of C major going D to D, in order to get at A major going from B to B. That jumbles up too many systems for me.
What I switched to a long time ago was either:
B major, lower 3 and 7.
B C# D# E F# G# A# B ==> B C# D E F# G# A B
B natural minor (key signature of D major), raise 6
B C# D E F# G A B C ==> B C# D E F# G# A B
I found this less cumbersome than the 2 to 2 as in the example of D to D, but I might still use that white key D to D reference to double check after the fact. But at the moment of working with B Dorian, to also be following something with D, mentally that put me between keys somehow. Glad you caught it.