Personally, the only problems I've only ever had getting macos to sleep properly has been when I've been running VMs. (Hello docker!)
When doing purely OS-local development (which is all I ever do these days, because I value my sanity) macos works great. (So long as you have a recent mac. New macos + old laptop is awful.)
But as nice as macos is, XCode is an absolute mess. Earlier today I was trying to import a swift package into xcode. The package looked fine, but XCode for some reason was only importing it as a "Folder Reference". Stackoverflow suggested quitting xcode and running "xcodebuild -resolvePackageDependencies", then relaunching xcode. And that fixed it! Why was that necessary? Why couldn't xcode figure that out on its own? What did that even do?? I have no idea. And I hate it.
These days developing in apple's ecosystem feels less like developing in a walled garden and more like developing in a swamp. They're truly lovely developer machines - just so long as you can stay away from xcode.