How can I write DMs?

I have a spreadsheet and want to write DMs in a field, but Libreoffice always replaces that with Dms after I exit the cell.
I disabled the Tools>Auto Correct Options>Correct TWo INitial CApitals option and I added DMs to the Exception list. But it still does it.

Tools -> Auto Correct Options -> Tab: Options -> [ ] Correct TWo INitial CApitals should do it. If it doesn’t, try Safe Mode, open an empty spreadsheet, make the settings and check, whether that works as intended. If it does work while running in safe mode, the problem is within your LibreOffice user profile and you need to reset to factory settings.

Test (this is not a solution) whether LibreOffice user profile is causing the issue:

  • Start LibreOffice
  • Restart in Safe Mode using Help -> Restart in Safe Mode and confirm the restart using button: Restart
  • Click button Continue in Safe Mode
  • Open a spreadsheet
  • Deactivate Tools -> Auto Correct Options -> Tab: Options -> [ ] Correct TWo INitial CApitals
  • Write your text into a cell
  • Provide feedback using add a comment about the test result.

Immediately after you exit the cell and DMs changes to Dms, press Ctrl+Z to undo the change, then click elsewhere or tab out of the cell.