I am trying to simulate a stereo camera in Blender and to measure the distance, but I am having some issues with measuring the distance of the cameras from the checkerboard pattern.
In Blender, I set the cameras resolution to 640 x 480 px, the baseline to 20 cm, and I am using the parameters preset shown below. The maximum distance between the cameras and the pattern, in Blender, is ~20 m.
I have taken several synthetic pairs of pictures, and I have been able to import in the MATLAB stereo camera calibrator eight pairs. The result of the calibration is shown below.

According to the obtained results, the distance measured by the cameras when the object is ~20 m away (Blender ground truth) is ~900 m, and I can't understand why. Moreover, the translation vector of the second camera relative to the first camera is t = [-20.0160512658773, -0.118042169030331, -328.082851181787], therefore the baseline is correctly measured, but there is something off with the z.
What am I doing wrong?

You probably entered a wrong square size for the points of the checkerboard.