All forms take bottom left buttons, all dialogues are right, and all overlays middle.
This is because making all buttons on Tes ranged on one or other side all the time (in the name of consistency) will be too restrictive in some cases.
Note that on mobile: we prefer all action buttons to be one the right (and their secondary/cancel items to their left)