The contents of a page in the Module: namespace are wrapped in a <pre> tag with the classes lua source-lua. That <pre> tag should also have the class mw-code so it can take advantage of any CSS rules applied to system-generated <pre> tags, such as the one I've proposed in T59824.
See also:
T59824: Display tabs in .mw-code as 4 spaces using CSS tab-size property.