Welcome MK! Can you post a sample of the code that’s not showing proper spacing? If you select it and click the “preformatted text” button above (</>) it should keep the spacing rather than being reformatted as a forum post by Discourse…
Edit: when you really need to force a paragraph break, there’s an alternative using *comment
that I describe here. But it would be good to see what’s causing the issue with a regular double enter.