The best way to do it is to have a seperate GPU that you pass through fully to the Windows VM - a friend has that setup - which works perfectly but then you can't use that gpu in Linux and I don't particularly think it's worth it for me to have multiple GPUs when wsl gives me 99% of what I want with minimal setup.
Of course, YMMV, I recall seeing that linus derp tech guy YouTube make it work one time. Good luck keeping it working properly in the long haul.
I feel I've already learned this the hard way, have several spare Supermicro servers to show for the result of what I consider to be a failed project.
Instead, I maintain a separate windows-only machine for such occasions. Takes up very little extra space or time.
Would love to hear from other folks who use this on the daily.
You can use consumer cards for this. Both Nvidia and AMD consumer cards. Nvidia drivers work fine now, and don't require any workarounds (they previously "blocked" VM's with their driver, but was trivial to workaround). AMD have a few hardware quirks, but that can typically be worked around too. Though you're best going with Nvidia as it's more straightforward.
It also seems that a lot of virtualisation software supports it (libvirt/qemu, vmware esxi, proxmox, xen, probably a few others). It's typically also, set and forget. Once it's configured, you're good to go. There's not much of "keeping it working properly in the long haul". I've had my setup for about 4 years or so now. Even through software and hardware changes.
It sounds like you're a pro, maybe I'm just not that good at configuring teh vmwares / virsh / xen / qemus.
https://mathiashueber.com/windows-virtual-machine-gpu-passth... https://linustechtips.com/topic/978579-guide-linux-pci-gpu-v... https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF
And you don't have to do it for the most of AMD cards and the newest NVIDIA cards.
Unfortunately that's not beginner-friendly, I know, but that's the problem of VFIO in general - you can't really do it without being comfortable with terminal, editing configuration files etc. It would be cool to make it automatic somehow, but that would require making some tool(s) for all the preparatiary work (assigning vfio-pci driver, building united) and adding features to virt-manager (to be able to all the stuff graphically, without modifying XML).
But anyway, in your original comment you said that passthrough is not possible with consumer GPUs, which is simply not true. It's possible with pretty much every consumer card.