It is natural for erection firmness to wax and wane throughout a sexual experience.
Many of us expect a penis to be hard the whole time we're being sexual, but this is sometimes unrealistic, especially during longer sexual encounters. If a penis does go soft, it doesn't necessarily mean there is an emotional or physical block, it could simply be a natural fluctuation in firmness.
So, there is an acceptance piece to this which challenges the story that a man needs to be hard from start to finish of a sexual experience. One way to work on this acceptance is recognizing that a soft penis can still feel pleasure, it still has nerve endings even though it's soft. If you or your partner do lose some firmness, try exploring some soft penis pleasure.
Typically, it is the thought of not being enough, or of being embarrassed, or of being less of a man, that stops a guy from continuing to be sexual when he goes soft. There isn't anything wrong with his body but because for him "erection = arousal" he gets in his head and thinks that if his erection is gone it means he isn't aroused, which is a bad thing and makes him feel anxious/ashamed. This anxiety/shame does indeed dampen his arousal, making it more difficult to get firm again.
So spending some time getting back in his body when he does go soft can be really helpful. Helping him recognise that he can still feel pleasure in these moments of softness is one way of getting him out of his head. This pleasure that he can then start noticing becomes a positive feedback loop and helps him feel more aroused and in turn his erection firmness will probably come back.