I got the same issue. After digging in the introduction of Code Runner, I found out the the default command for running python is “python -u”.
Simply go to the settings>Extensions>Run Code Configuration then find executorMap, and click the “Edit in setting.json” button.
You’ll see something like this screenshot. Edit the “python” line, make sure it’s "python": "python3 -u"