Hi, thanks for using Petco Pet Education Center, formerly Petcoach!
I think you are asking how to train your cat to not go through the door to the outside deck? Cats are very hard to train. You can use a noise deterrent or water squirt bottle to essentially scare Gracie from going near the door but I don't recommend that. It is environmental enrichment to allow cats to look outside. My suggestion is to keep the screen closed unless you are there on the deck. If you want to allow her on the deck when you can watch her then do so. There are ways to clicker train and positively reinforce animals to sit at the door and not go through it. This will take time and cats do not train as well as dogs.