They are a bit of a pig to get correct, that is why when I am removing/refitting doors I always leave the hinge on the pillar.
If I have got to replace a hinge then I always mark the hinge position on the pillar.
So I guess that you are now in a situation of adjustment trial and error.
If your replacement hinge came from a damaged car, then perhaps the hinge may have a slight twist that you will not see with the naked eye.