The berth moves at in the ship's initial rest frame, so it too is subject to length contraction:
The ship remains long in this frame. The two length comparisons use different simultaneous endpoint events; this is the same relativity of simultaneity that resolves the ladder paradox. Physical docking also requires deceleration, whose later effects are outside these initial inertial measurements.