Should a "Close" button on a dialog message modal always be in the same position and style?

Here are two examples of a current message dialog we have in the application I'm working on. The close button is the primary and only button in the left dialog. It's one of two options in the right dialog, so it's given the secondary button position/styling. This feels a bit awkward. Is it best practice to always keep it in the same place and same style? Or to treat it differently when there are other options available?

We also have messages that have "Cancel" which always sits in the bottom left position with the secondary button styling. Not sure if that impacts the answer to this at all. enter image description here