There are a few things that come to mind based on your description however without actually examining him it is hard for me to say exactly. I recommend getting him to your vet for an examination. It actually isn't a bad idea to take both the male and female to see if there are any structural abnormalities that are causing the problem.
Here are some of the things taht may be going on:
1. Persistent penile frenulum. This is a tissue band that leads back and down from the bottom tip of the penis. If your dog has this tissue it will be impossible for him to extrude his penis far enough out to breed the female. This sounds likely in your dog's case.
2. Fracture of the os penis. This is a bone
in the penis that runs through the shaft. It is possible for them to break this bone and cause the signs you are seeing however, it is usually a painful condition. So if your dog is not painful this is less likely I think.
of the penis and/or prepuce (sheath that holds the penis)
The hymen is a membrane at the junction of the vestibule and vagina in female dogs. It is rare for this membrane to be completely intact but if it is the male dog may not be able to penetrate into the vagina.
So, I think an examination by your vet is going to be your best bet. I hope this helps. Best of luck!