I think it is not so much the actual version of the package, but whether a virtual desktop is used, as opposed to the existing X session.
The following seems to work
mkdir -p ~/.config/systemd/user
echo \
"[Unit]
Description=RealVNC server in virtual mode
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/vncserver-virtual -RandR 1280x800 :1
ExecStop=/usr/bin/vncserver-virtual -kill :1
[Install]
WantedBy=default.target" \
> ~/.config/systemd/user/realvnc-virtual.service
systemctl --user daemon-reload
systemctl --user enable --now realvnc-virtual
Then connect your VNC viewer to port 5901 and launch Mathematica.