This recently came up at my company too. Some HIPPO decided that primary buttons should be set flush right. Yet everywhere else on our site, primary buttons are flush left, with the secondary button adjacent to the right. At least that’s the pattern for right-to-left languages. For Arabic and Hebrew, it’s flipped.
All the sources I found agree that there should only be ONE primary button per page or modal, but they do not agree on the order. See:
Since there is no rule, I would go with consistency here. Follow the standard placement of buttons that’s already on your site; don’t surprise your visitors with a novel layout.