Quotation marks around an entire sentence, ending punctuation falls with the quotation mark.
Quotation marks around one word/last word of a sentence, ending punctuation falls outside of the quotation mark.
Example 1: "This is an example."
Example 2: This is an "example".