Cursor not at correct place after tab

When I type a tab at the beginning of a line, the cursor initially moves forward by 2 spaces. However, if I type anything after the tab, the cursor suddenly jumps to the 4-space position. Is there a way to disable this “sudden jump”?
Screen Recording 2024-12-19 at 20.41.43

I also want to use spaces at the beginning of lines to align my Markdown source code better. However, as the fig below, there is a sudden jump from 3 spaces to 4 spaces.
image

I conjecture the 2 behaviors are due to similar reasons. Anyway to resolve them?

I have reported a bug, which might be due to a similar issue you are facing. Can you please confirm if you are also facing this issue : Data hides in the Reading Mode and Cursor position bug for Multi-level Indentation

It seems like, few people are facing it, but few are getting the content rendered properly.

Did you figure out a solution for this?

I have the same issue. When I tab over, the cursor starts at the indentation guide. When I enter my first character, it jumps to the appropriate place.

I am currently doing a workaround given by the recommendation of a reddit user on /r/ObsidianMD on a post entiled “Cursor jumps forward when indented” (sorry I apparently can’t share links in replies). Disabling indentation guide (Settings -> Editor -> Show indentation guides (under display)) makes the cursor appear where the text will actually be placed when I begin to type on an indented line.

This fix is temporary and I miss my pretty lines. I hope this can be fixed!

I believe this may be a duplicate of issue #96344