I’m curious what you are referring to losing work due to a misclick?
If you place “Discard” and “Cancel” next to each other, without a margin in between, is easier a user looking to click on “Cancel” to click on “Discard” and lose a document. This is more common than people think and that’s why Apple added the margin there and also why any good UX manual tells you to add a margin for destructive operations like that one.