This is not related to the code macro. It behaves the same with any macro that is called inline (for those that support inline mode of course). And it's a bug in the standard CKEditor regarding how inline widgets are handled. We use CKEditor widgets to wrap and protect macro output. The problem can be reproduced with https://ckeditor.com/docs/ckeditor4/latest/examples/placeholder.html where placeholders are inline widgets.
My question for you is why do you have to use the code macro inline. You say "block of code" but that is not a block if you use it inline, between text. If code / syntax highlighting for those inline snippets is not critical then you could use instead the Typewriter style which generates the ##foo## syntax.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.