When you move to the beginning of a line in a Code Block, the cursor jumps the end of the previous line. You cannot position the cursor a the beginning of a line.
When you press “Enter” to create a new line in a Code Block, the cursor position does not change, but a line is inserted below the cursor.