Well, your docking port is attached the wrong way. It has two nodes, top and bottom, where the bottom one is that one, where the vessel goes and the top one is to dock. It seems you clipped to top one for attaching it to the vessel, which seems to count as "docked". You probably need to rebuild your ship