You are right, the problem was the processor. The default processor is "centroid", which looks like it has hardcoded the G20, even if I use mm in my FreeCAD program. When I use GRBL as the job processor, it generates G21.
Should I submit a bug report, or is this problem already known? Maybe would be better to use GRBL as the default processor, if cntroid is broken. What are the advantages and disadvantages of the different processors?