Chunk of Python code continues to run after clicking on red square

Can you show this in a reproducible example (reprex)?