Indents in codeblocks are making a list inside of the block, messing up text alignment

What I’m trying to do

Inside of codeblocks, upon indentation (both while tapping the spacebar 4 times and using the tab key), it creates a “list“ **inside** of a code block. This messes up text alignment because of the small “gaps“ as visible in the screenshot.

Things I have tried

I tried searching online about this but unfortunately Google is useless and I was only able to find posts about indenting entire codeblocks and nothing related to my problem.

How can I disable this behaviour?

Upon some inspection, the formatting seems to be correct when using the reading mode. Only an issue while editing codeblocks. Which is fine, I guess. But still annoying.