Picture lost in canvas and function

If you want to keep running it through WSL2, you need to install an “X server”, e.g. VcXsrv (google it and get it from sourceforge), and have this server running before opening the linux environment. See here some instructions for WSL2: