Seems that margin-bottom is ignored for some elements such as tables, code blocks and math blocks.
Paragraphs, for example, get the theme margin-bottom correctly, instead the other elements are stucked to a fixed margin, making the whole document weird:

