Search for “vfio single gpu”, It’s possible, but it has drawbacks. Iirc you have to run everything as root or something like that.
Another recommended way is to run a headless linux as host, and passthrough the gpu to a linux guest next to a windows guest, than you just switch between the guests