(Strangely, there’s an option within the style definition of “Don’t add space between paragraphs of the same style.” Why there should be an option of *not* doing something so unorthodox is another mystery; however, it also has no effect.)
I use exactly this option to document code together with numbering like "001", "002" and grey background. So I (with the same style) spacing when starting the code and endig the code, but not during paragraphs inside the code.
Sometimes there appears also a very thin line between the code-numbers. But I don't think this it what you have detected.