I have an Australian Shepherd who is almost 5 years old now. I've always had problems with her being territorial around my house, but it's gotten a little bit worse lately. She barks at anybody she sees out the window, even if they're all the way down the street. When we have visitors over, she will only bark at them for a minute and then will calm down. This is fine and not too big of a problem. The bigger problem is that she'll chase after anybody she sees anywhere near our property if she is outside. If we open the door and she hears somebody outside, she will race out the door and start barking loudly and chasing after them. She never does anything more than this or tries to bite, but she still really scares people. We've tried so much to get her to stop doing this. In the beginning, we tried a bark collar, but she grew used to it and would keep barking and chasing even though she was being shocked. We've tried positive reinforcement and other things like that, but it never seems to have any effect on her. Most recently, we've tried using a high-pitched sound to distract her from the people around the house, but now she is desensitized to it and will just ignore it.
I know that just keeping her on a leash would solve this problem because she can't chase after people, but I can't keep her on a leash all the time. Every time we open the door, she sprints outside very quickly and we have a hard time stopping her. She is a very smart dog and we can't trick her with treats or anything.
I need some advice for anything else I can do to stop her from scaring people like this. I've considered an invisible fence, but considering how she was able to get used to the bark collar I worry that the invisible fence wouldn't bother her either. Putting her in a crate while we have the door open is also an option, but she gets anxious when we leave and I worry that being in a tight space would scare her more. I feel like I've run out of options -- any advice is greatly appreciated!