Xcode needs an Apple ID for download but the macOS SDK and toolchain does not.
Try to run any developer tool or "xcode-select install" and it'll download the command-line tools independently from Xcode.
(and then bring your own IDE)