You can lose your erection because you may have performance anxiety or you may have bad habits that may cause intimate dysfunctions. Even if you're able to get erections when you're alone despite the nearby presence of your partner but not during love-making, that doesn't necessarily mean you're not aroused in that kind of situation.