as windows cannot natively partition are setup the tables for newer macOS like how you can’t view or setup native Linux/Ubuntu partitions and file systems in windows without an external helper app or mod. I was having huge problems finding a still working copy of any macOS (can’t be recent ones as there are memory issues and a change in instruction sets for newer flavors for say the M1 chips but the guide suggested Big Sur as I guess it only requires 4GB of system ram and the entire install could still fit on a 64GB bootable flash drive setup using a windows native live boot install method such as Rufus. the main reason was that it provided a still working link to download the macOS installation for free and burn to usb.
You can install a version of MacOS Big Sur onto a fresh virtual box installation (pretty sure I checked a Linux based x86-圆4 platform when choosing OS distribution type but I followed a online tutorial I found using a Google search from like 2017 or 18. But actually, yes you totally can run Xcode within a windows envrioment.