I'll be honest I am not an expert, but after 40+ years as a Male, I have found that erections don't always have to come from arousal. Personally I believe that there was always some aspect that came from basic human instincts, and that sometimes it's just the body reacting.
I know it does not help with your dysphoria, but maybe knowing that it really isn't you that's causing it may have a calming effect.