All the more reason to buy a Lenovo and put Linux on it.

For XCode, you can easily run macOS in QEMU with GPU passthrough. Linux is the best general purpose OS unless you're technically illiterate.

https://github.com/foxlet/macOS-Simple-KVM