The issue is that you are using the 'visual bounding box' for displaying measurements in Inkscape.
All the boxes in your drawing have a very wide stroke, which goes beyond the area that is actually the rectangle. Remove the stroke to see how large the rectangles are really. Those boundaries, after removing the stroke, are the boundaries that any plotting program will use, and also define the rectangle size in the SVG code.
To use a geometrical bounding box for displaying the size of objects, go to the settings: Edit -> Preferences -> Tools: use geometric bounding box
Attached picture:
left: without stroke, right: with stroke