Had a similar issue. Switching to 3.12 solved the indentation issue but produced a different error when I tried to re-run a line after I ran the full script.
Switching to the pre-release Python extension on VS Code (PR mentioned here: https://github.com/microsoft/vscode-python/issues/24256#issuecomment-2465711450) fixed everything!