You’re incorrect. Everything is not tied to the UI in Windows, and Windows systems can be run without any UI stack running at all (Windows 10 IoT). Just because a configuration doesn’t make sense to offer to a wide audience, it does not follow that it’s not possible.
If we’re speaking about “true kernels”, then as someone who uses Linux daily, generally likes doing so, and earns a living from it, I will still confidently assert that NT is a better kernel than Linux, any day of the week - it’s a shame it’s closed-source and unlikely to ever be fully opened. For that matter, so is QNX, and so is Mach or XNU, as Apple call their Mach-ish kernel. Linux’s killer advantage over all of those has never been its technological prowess, but rather its openness and fast update cycle.
In a better version of this world, the BSD networking stack would have been brought into Linux very early on, and someone would have taken the initiative early to make the output of the Linux-specific tools much more amenable to scripting than they are. Now, those early, poor, decisions have ossified, just like they do with every mature operating system.
(In a similar better world, MS would have got religion about twenty years earlier than they did, and would have provided a full Unix user-space on the first Windows NT release, to run beside the GUI, as Apple does on MacOS. In that world, though, I don’t think Linux would have ever got traction, and they would have extended their market dominance even further, so maybe it’s for the best on balance...)