It might be that the "tabs" are inserted in every possible white/empty space. I've had that happen a lot back when i wrote my scripts in OneNote and copy pasted into VS Code, and from other code from websites.
There might be a whitespace/tab view/highlight setting or an extension for VS Code or others.