The sentence that contains an incorrect pronoun shift is: "I thought I saw a dog bury their bone under the tree."
The issue arises because "dog" is a singular noun, and using "their" as a pronoun typically refers to plural antecedents. A more correct phrasing would use "his" or "her" if the gender of the dog is known, or simply rephrase to avoid the pronoun issue.