I have problem with ConfigurableJoint

There is a chain of units that are attached to each other using CongigurableJoint.(RotationUnit - top unit, HeadAttachment - bottom unit). The bottom chain has all axes locked, but it still ignores these settings and is not axis-locked. You can see in the picture what I’m talking about. Also, in the picture, the settings for the lower unit are attached on the left and the settings for the upper unit are attached on the right.

Can you please tell me what this could be and how it can be fixed?