Separating them is good for avoiding misclicks.
Decades ago, MacOS properly had the close box for windows on the opposite side from minimize etc. widgets; now the one destructive window action could be reasonably safe without confirmation. Then Windows started gaining popularity and nobody ever did it the right way by default again. A pity for the sharp minds at Xerox PARC.
I don't mind ok and cancel being on opposite sides. It's mainly ok not being bottom-right that bothers me.
Command Q and Command W are still beside each other though