A picture would be great, but lacking one I will take a shot.
The back of the pin box hit the rails, because from the center of the pin to that back of the pin box is greater than half the width of the bed between the rails, that should be obvious, just stating.
The rub likely comes from the install of the Anderson Pin adapter. If you installed with the ball forward of the pin you added about 4" to the distance from the ball to the back of the pin box.
If you are lucky you can trial the back of the pin box.