The two OS kernels and API are super close (outsider perspective). I used win2k for like 10 years mostly on the back of applications and games supporting XP for so long. I can't recall the big API differences. Maybe XP has UAC and there were APIs to check for it? Anyways, I still have fond memory of manually patching out API calls hard coded into EXEs to bypass XP only parts which were almost always superfluous.
Yes, I'm aware. Normally they shouldn't behave wildly differently, but the new GUI and userspace features made the system a bit flaky at first. Also, XP became a bit more finicky about drivers over the years, and this broke stuff, too.
2000s kernel was one of its better features, but lack of blingy GUI was also helping in its stability IMHO.