We were all virgins once.....
Anyway, you're not maintaining an erection for that very reason. You're a virgin. You're experiencing sexual feelings for the first time and you're unsure of what to do and sometimes you get too excited and you lose it. It's nothing to be ashamed of. We all went through it. Now, you say that she's the most understanding person in the world. That's good because both of you can work through your inexperience together since she's only had one partner before. Both of you need to relax and just move slowly with each other and do what feels comfortable. MY wife and I are still experimenting and we've been married 8 years so far so it tales time. Just go slow, don't rush it and stay safe.