I assume that others do basically what I used to do.
This would consist of painting and detailing the cockpit, at least as much as you have to do before installing it in the fuselage.
Then install the cockpit in the fuselage.
When ready to paint the fusalage, mask the cockpit slightly above the cockpit edging. When the fuselage is finished, remove the masking, paint and detail the edging, etc.
Is there any better way to do this that I'm not aware of?