Tab Indent Size is not being properly respected

The problem is that rendering of code blocks does not respect the tab size setting. Not only that, the display that results messes up editability.

Steps to reproduce

Copy this code into a code block:

[popover] {
	&, &::backdrop {
		transition:
			display .5s allow-discrete,
			overlay .5s allow-discrete,
			opacity .5s;
			opacity: 0;
	}

	&::backdrop {
		background: black;
	}

	&:popover-open {
		opacity: 1;

		&::backdrop {
			opacity: 0.5;
		}
	}

	@starting-style {
		&:popover-open,
		&:popover-open::backdrop {
			opacity: 0;
		}
	}
}

It is using tabs for indentation.

On a default Obsidian, tabs are rendered as 4 spaces. That looks fine (note where the cursor appears also).

Now, change the tab indent size to 2:

The code block renders exactly the same as for 4, but now the cursor can be placed in “wrong” places, and editing becomes more and more broken for each level of indent - because where the cursor is rendering not where the effect of typing happens.

Did you follow the troubleshooting guide? [Y/N]

Yup, I did.

Expected result

The indentation and indentation guides should change to respect the setting.

Actual result

It’s broken - look at where the cursor is rendering, and how the indentation depth is exactly the same as when it’s set to the default 4 spaces.

Environment

SYSTEM INFO:
Obsidian version: v1.5.11
Installer version: v1.4.13
Operating system: Darwin Kernel Version 21.6.0: Mon Feb 19 20:24:34 PST 2024; root:xnu-8020.240.18.707.4~1/RELEASE_X86_64 21.6.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none