I had a rat terrier when I was younger that did that very same thing. If I remember right, The way we got her to stop was we leashed her and walked her up to shadows that were stationary to show her that it wasn't "real" and that she couldn't play with it. How old is she? It also might be that she is still a puppy and doesn't grasp the concept of what shadows are yet. Hope this helped!
Bookmarks