You change the font the editor uses in Tools > Options > Appearance > Editor font family. I can only speak for Windows and Linux but you have to get the name “just right” in the Editor font family field.
Open whatever “Font Settings” utility your system uses and search for the monospace font you want to use. Then type the font name into the Joplin Editor font family field exactly as it is shown under the font.
I dont know how Joplin selects a font if one is not specified. I assume there is metadata in the font files that tells the OS whether they are monospace or proportional. So I guess this would work just like how a browser handles a css style where font-family is set to “monospace”, such as
If you are referring to code tags as displayed in the viewer then adding the below to userstyle.css will do this.
font-family: "Roboto Mono"; /* sets code font - fenced code, inline code and pre - should be a monospace font */
Roboto Mono with the name of your preferred installed monospace font, just as you discovered using your font utility for the editor font.