[VSCode] Plot pane is not working for PGFPlotsX

Hi everyone, I’m trying to plot some graphs on the plot pane on VSCode.
I have toggled on the Use Plot Pane option as below:

Unfortunately, everytime I type td or display(td) in the Julia REPL after the following code, it opens a pdf reader (preview) and display the figure on it instead of the plot pane. Can anyone help me fix this?

Here is the MWE:

using PGFPlotsX

push!(PGFPlotsX.CUSTOM_PREAMBLE,
    raw" \usepackage{bm}")

td = TikzDocument(raw"""
\begin{tikzpicture}
    \begin{axis}[
        xlabel=$\bm{x}$,
        ylabel=$y$
    ]
    \addplot[smooth, mark=*, blue]
    table[row sep={\\}]
    {
        0 2 \\
        2 3 \\
        3 1 \\
    };
    \addlegendentry{Case 1}

    \end {axis}
\end{tikzpicture}
""")

And here’s my environment:

julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 
(@v1.6) pkg> status
      Status `~/.julia/environments/v1.6/Project.toml`
  [7c4d4715] AmplNLWriter v0.7.2
  [c52e3926] Atom v0.12.34
  [aaaa29a8] Clustering v0.14.2
  [5ae59095] Colors v0.12.8
  [a93c6f00] DataFrames v1.2.2
  [31c24e10] Distributions v0.25.16
  [191a621a] Dualization v0.3.4
  [2e9cd046] Gurobi v0.9.14
  [7073ff75] IJulia v1.23.2
  [b6b21f68] Ipopt v0.7.0
  [4076af6c] JuMP v0.21.10
  [e5e0dc1b] Juno v0.8.4
  [67920dd8] KNITRO v0.10.0
  [b964fa9f] LaTeXStrings v1.2.1
  [23992714] MAT v0.10.1
  [6405355b] Mosek v1.1.3
  [1ec41992] MosekTools v0.9.4
  [f10290a3] NEOSServer v0.4.0
  [a8b11937] OpenDSSDirect v0.7.2
  [8314cec4] PGFPlotsX v1.4.0
  [91a5bcdd] Plots v1.21.3
  [c36e90e8] PowerModels v0.18.2
  [6e471128] PowerModelsAnnex v0.7.1
  [c946c3f1] SCS v0.7.1
  [29cba6d7] Bonmin_jll v100.800.800+0
  [8ba89e20] Distributed

I can’t reproduce this issue on version 1.4.0 of the extension.

@pfitzseb Thank you for the reply. I tried this with three different macs, and they were all the same. Please see this:

Dear @pfitzseb and other users,

Could anyone take a look at this and tell me if it is just my macs?

Thank you!