Visual Studio Code shows the side bar on the left side by default. However, you can move it to the right if you want. Just right-click on the side bar and choose "Move Side Bar Right".

Change the side bar position via context action

When collapsing / expanding the side bar your code does not jump anymore when the side bar is on the right side. This helps a lot if you toggle the side bar very often.