How do I make a Makie animation appear in a VSCode plotting window?

Casually, I found an error using WGLMakie to make this animation appear in the VSCode plot pane, and it was related to the VSCode zoom. When it is zommed by default (ctrl+0 in Windows), this following MWE should work.

using Makie, WGLMakie
Makie.inline!(true)

time = Observable(0.0)

x = range(0,1,100)
y = @lift(sin.(2π*x)*cos(2π*$time))

fig = Figure()
ax = Axis(
    fig[1,1]
)

scatterlines!(x, y)

framerate = 30
timestamps = range(0, 2, step=1/fps)

record(fig, "sim.mp4", timestamps; framerate=framerate) do t
    time[] = t
end