Changing a filetype setting during editing is simply not usable.
For what it's worth, I think that is what VS Code does: it attempts to auto-detect (not sure if just based on file extension or actually content) but t the docs suggest it shows the resulting filetype somewhere prominent, I think on the statusbar, where it can easily be changed. So it kind of expects you to manually switch during editing if it gets it wrong I believe. But I personally also prefer the JSON highlighter to just not be as strict in general, so that I don't need to do manual toggling if it gets it wrong