Gnuplot.jl opens up plot pane as well as an external window

Plotting a figure using Gnuplot.jl inside VSCode will display an external window + the plot pane (however, the plot pane is empty). I am using WSL 2, so using the Remote - WSL extension on VSCode and also running an X-Server to show/display graphics from WSL2. I think Gnuplot automatically sets the terminal as X11.

Function I run:

function test_gnuplot()
    x = 1:100
    @gp x x.^2 "with lines title 'Parabola'"

Version Info

julia> versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
  JULIA_EDITOR = "/home/affan/.vscode-server/bin/fcac248b077b55bae4ba5bab613fd6e9156c2f0c/bin/code"

See image below for example:

I did do another test by quitting the X-Server. In this case, nothing actually shows up and my REPL hangs. I am not sure whats happening in the background.

julia> test_gnuplot() ## hangs here

I am guessing Gnuplot was not able to set a terminal, or that whatever terminal it set can not be shown in my window or in the plot pane.

I was able to turn off the plot pane in VS Code preferences, but I was wondering if there is a solution where the X11 figure that pops up is actually shown in the plot pane?