I have Ubuntu 18.04LTS install inside WSL2 and I was able to use GPU. I can run $nvidia-smi from window run terminal.
However, I can not find any result when I run $nvidia-smi on WSL2
From the known limitations in documentation from nvidia :
NVIDIA Management Library (NVML) APIs are not supported. Consequently, nvidia-smi may not be functional in WSL 2.
However you should be able to run https://docs.nvidia.com/cuda/wsl-user-guide/index.html#unique_1238660826
EDIT: since this answer, nvidia-smi supported since driver 465.42
I am running it well using 470.57.02.