Rendering a custom code block as a normal code block in editing view

Hi, I am writing a plugin that uses code block processors to render code blocks differently in reading view. However I would like them to not be rendered differently in editing view. It should look and behave the same as any other code block in obsidian while in editing view. I have already found a way to determine whether the code block is being processed in editing vs reading view, I just don’t know if there is a way to call the default obsidian renderer to render the code block in editing view. What I tried so far was:

process(source: string, element: HTMLElement, context: any): void {
  if (context.el.classList.contains('block-language-' + this.getName())) {
    MarkdownRenderer.render(this.app, '```custom-code\n' + source + '\n```', element, context.sourcePath, this.plugin);
  } else {
    // handle reading view
  }
}

But the render call only renders the code block as if it were in reading view.

So my question is how do I render them like in this picture while in the editing view: