Close button position: corner or inside?

This is the modal dialog for the admin page. We had a discussion about the close button position. Which one do you think is better?

A is more common and can be seen in many great web apps (Figma, Twitter, Slack, Bootstrap, etc.). B somehow looks like an ad. (Big Sur is using it in notification, miro)

This is a general style decision for our design system, which means where do we put the close button on different modals.

Our survey ("which works best for you") shows that people prefer B more. The reason is clarity and discoverability.

My big question is, why do many great apps use the INSIDE close button instead of B. Why A is more commonly seen than B (maybe I am biased).

enter image description here