Is it necessary to use a Virtual Machine (VM) setup or can we need to use WSL2

I am getting this error on distrobox. How do I solve it?

Try this post. Is it necessary to use a Virtual Machine (VM) setup or can we need to use WSL2

And I found that after installing Install nvidia-prime by: sudo apt install nvidia-prime

The issue gone!