Getting accurate physical sizes in Gimp requires going over many pitfalls. See this for a start. The main difficulty is coming to grips with the idea that the physical size on your screen is usually not the size that you will get on the paper, so you need an act of faith/trust.
Otherwise, works for me... In the image below, I have set the print definition to 100px/cm so my 400x400px image is 4x4cm (or 40x40mm). Setting the measurement unit at the bottom to mm set the rulers and the Measure tool accordingly...
And switching to measurements in centimetres switches the rules and the Measure tool:
And when adding a guide the guide position uses the same units:
Otherwise, works for me... In the image below, I have set the print definition to 100px/cm so my 400x400px image is 4x4cm (or 40x40mm). Setting the measurement unit at the bottom to mm set the rulers and the Measure tool accordingly...
And switching to measurements in centimetres switches the rules and the Measure tool:
And when adding a guide the guide position uses the same units:
If you unset View ➤ Dot for dot and if your display definition is properly calibrated/determined the physical size on the screen is accurate too: