Not if they are taught to bark. Not attack, just wake up Mom&Dad about the guy breaking in.
A watch dog is just that: WATCH. The job description says nothing about repel. Quit buying a doggo for protection if you are unwilling to work as a team: you let me know, I handle the problem. Oh, and then, you don’t dig him up.
All three dogs we have had over the years would bark at strangers coming up to the house (if the dogs were in the house).
Two of them wouldn’t bark until they were on the steps up to the door. One of them would bark as soon as they set foot on the driveway. People could walk by on the sidewalk all day long and no barking, but set a foot on the driveway....
He was an Australian Shepherd. Super smart dog and friendly. I imagine if anyone broke in they all would have just barked a lot, unless the bad guy brought treats!