Steps to Reproduce:
@IceGiant Please also see the setting editor.detectIndentation which is on by default. The editor.tabSize is the fallback value in case detecting indentation is not possible (new file, no indented lines), otherwise the file you open is scanned and an indentation is detected. The detected indentation settings are displayed in the status bar at the bottom, and pressing Tab or indenting will respect the indentation displayed in the status bar.
I missed that an extension was overriding the editor global config when editing .js files and had to be separately configured, so that explains why I was running into that.
You can do ctrl+a then shift+tab a few times in the document to unindent everything. Then close and re-open and do alt+shift+f to get the document on the tab size from the settings.
Thanks @toddmo for the solution.
Most helpful comment
@IceGiant Please also see the setting
editor.detectIndentationwhich is on by default. Theeditor.tabSizeis the fallback value in case detecting indentation is not possible (new file, no indented lines), otherwise the file you open is scanned and an indentation is detected. The detected indentation settings are displayed in the status bar at the bottom, and pressingTabor indenting will respect the indentation displayed in the status bar.