The possibility of Buffy losing guardianship of Dawn is discussed several times, but it comes to a head in the Season 6 episode "Gone" when a social worker comes at absolutely the worst time, everyone says absolutely the wrong things, and ends up with the following:
MS. KROGER: I think I've seen enough.
BUFFY: No, actually, I really don't think that you have. It's just ... it's been kind of, kind of a, a bad time.
MS. KROGER: It's been a bad time now for a while, hasn't it, Ms. Summers? [...]
BUFFY: But there—there are good reasons.
MS. KROGER: Oh, I'm sure there are. But my interest is in Dawn's welfare. And the stability of her home life, something I'm just not convinced that an unemployed young woman like yourself can provide.
BUFFY: I can. I, I do!
MS. KROGER: Well, we'll just have to see about that then, won't we? Oh, and I'm, uh, going to recommend immediate probation in my report.
BUFFY: What does that mean?
MS. KROGER: It means that I'll be monitoring you very closely, Ms. Summers. And if I don't see that things are improving, well, I'll be forced to recommend that you be stripped of your sister's guardianship.
BUFFY: You can't do that.
MS. KROGER: I do what is in Dawn's best interest ... as should you. Have a nice day.