CONTENT WARNING: GROWN-UP STUFF (not too graphic)
---------------------------------------------
It's great that your husband is pan, and that he's obviously accepting of your transition. I presume that when you say he's having trouble maintaining an erection apart from during anal, you mean he's struggling to maintain an erection specifically during vaginal penetration. He's clearly still sexually interested in you, and the fact that he's so accepting makes me wonder: is it possible that he's had a mental shift that means he now perceives and accepts you as male, but his mind associates vaginal sex with women and anal sex with guys? And now that he perceives you as a guy, a part of him is struggling to consolidate the two concepts? Is it also possible that if/when he's been with guys in the past, he specifically preferred anal? (These questions are rhetorical, obviously. It's nobody's business but yours what the answers are).
If so, it's possible you could both work through this in time, especially if he's as awesome as you say he is. On a personal level, I know it took me a couple of years to get my head around the concept of having vaginal sex as a man, and I'm the one who made the decision to go through transition... so it's understandable if some cis guys also need time to process this. A sex therapist who has experience of trans issues would be helpful if this is the case, and if he has difficulty getting his head around the concept at the moment, it may be a good idea to mainly have other forms of sex instead of PiV for a while, whilst he works through it.
Sadly, my own situation is pretty dire: the instant I came out, my husband (who is actually quite homophobic) decided he didn't want to continue our sexual relationship if I was going to transition. We had sex once after I came out... and that was three years ago. We still live together to provide a home for our kids, and the whole situation is hellaciously awkward as I'm sure you can appreciate.