Visual Studio seems to ignore my indenting setting for JSON files. It is indenting 4 spaces, instead of my setting of 2 spaces:

When I format the document it looks like this:
I am using:
Microsoft Visual Studio Professional 2022 (64-bit)
Version 17.5.1


It turned out that the project had an
.editorconfigfile in the root folder withThis was overriding all the indenting options since it was "Following the project coding conventions"
UX tip to Microsoft: make it somehow visible in the Options window that some settings are overridden.