Using Jupyter console with Jupyter notebook triggers uncontrollable pop-up Qt-windows

When generating matplotlib figures inside of Jupyter notebook with %matplotlib inline, all is well. However, when I connect to the same Jupyter kernel using jupyter console --existing, the figures in the notebook are repeated in pop-up QT windows. Note that I did not set %matplotlib qt5 in the Jupyter console. Is there a way to turn off this pop-up behavior? It goes away if I close the jupyter console, but that defeats the purpose of using the consul in the first place.

Thank you!