I had the same issue after installing VMWare, I uninstalled it but this didn't fix the issue.
Solution for me: in "Turn windows features on or off" I turned off:
then restart
After the restart I got this message from docker:
I ran the ran the command as said in the message
Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")
Then restart and voilĂ , Docker was back with WSL2