I'm using IntelliJ IDEA 2023.2.2 Ultimate Edition (Build #IU-232.9921.47), though this bug started happening to me in 2023.2.1 I believe.
I will be editing a file and suddenly the IDE will just revert to the default indentation settings and stop using the ones that I have configured. It seems to happen more regularly when I'm copying and pasting code or starting a new JSDoc block but I'm not sure exactly. I don't have an EditorConfig and I don't have ‘detect and use existing file indents’ enabled. It doesn't seem to matter whether I'm saving the code style settings to the Project or the IDE, or some custom scheme.
You can see here that the IDE claims the file is using 4 Space indentation:
The only way to get it to go back to the configured 2 Space indentation is to fully close the IDE and re-open it, in which case it will work for some time before (seemingly randomly) flipping back to 4 Space indentation.