It works properly if I import as HTML, but that would mean the notes would no longer be (easily) editable, so I hope I can avoid that. What's interesting is that the rendered HTML has what looks to me like extraneous elements in the hierarchy:
<pre STYLE="font-family: 'Source Code Pro',Consolas,monospace; white-space: pre-wrap; display: block; font-size: .9em; word-wrap: break-word; color: #333; background-color: rgba(102,128,153,0.05); text-align: start; padding: 0; margin: 0 0 1.1em; line-height: 1.6; border: 0; border-radius: 5px; word-break: break-all;">
<code STYLE="font-family: 'Source Code Pro',Consolas,monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #333; display: block; overflow-x: auto; background: #f8f8f8; padding: 1.3em 2em;">
<div STYLE="min-height: 1.5em; color: inherit; line-height: 1.6; background-color: transparent;">jq -r <span STYLE="display: inline; line-height: 1.6; color: #d14; background-color: transparent;">
Could it be the pre > code > div structure that's causing the problem?