Personally, I don't think so. I know sometimes mine touches. But as long as you are getting a good tone on your D strings and it's comfortable and you can get to the other chords before and after ok, then I think it's ok. Others might chime in too and give you some more advice.
D was always such a problem for me because I kept landing on the wrong strings. But once I rewatched the vidoes for that chord I realized I was leading with the wrong finger. One slight adjustment and I've had it ever since (well, mostly!).
“Often, what seems like an impossible climb is just a staircase without the steps drawn in.” Robert Brault, American Operatic Tenor