Running python cells in a quarto file with interactive vscode

Hi everyone,
I have trouble running code chunks in quarto. Whenever I'm working with quarto in Visual Code, I cannot run all cells in order. More specifically, interactive python doesn't run above cells from the very first chunk, so it gives me an error telling me undefined variables exist in the file. Is there any solution to this issue?