Is the unit set to mm in the board settings? If so, is the editor currently set to mm as well (with the mm button in the lwft toolbar)? If both are set to mm it doesn’t seem correct that KiCad would plot the dimension in inches. I don’t know of a setting in the python api to change the unit of the plot.
You can change the unit of the dimension from automatic to mm in the properties of the dimension. At least that should give you the desired output.
“Automatic” means “follow the user’s UI setting” which is not related to any setting stored in the board/project. So, it doesn’t much make sense in the Python context. We could add an API in the future to allow Python scripts to specify the “UI units” but until/unless that happens, your best bet is to use a different units mode.
I’m currently solving this problem in the following way:
The user can define the units in KiBot config.
When we load a PCB all dimensions with automatic units are changed to the units selected by the user. I scan all drawings looking for PCB_DIM_* objects.