I am not a painter but I would expect that until the paint is properly dry, which can take a few days, there is always the potential for marks to be left when the door is shut firmly – there can be quite a lot of pressure between a door and its frame when it is firmly shut.
I know from experience (I’m a carpenter) that when working on doors even several days after they have been glossed the paint can still be surprisingly soft and rub off onto your tools – planes, chisels, router bases, etc.
As a non-professional the only solution I can think of is either don’t use oil based paints, ie water based paints instead, or thin the paint and do several thin coats allowing each one to dry before applying the next – they should dry significantly quicker.
Front doors are obviously always a problem because they usually need to be shut on the same day, but if you can manage to leave it overnight loose with perhaps just a security chain on that would help. Minimising the pressure between the door and the frame is the answer imho.