Deck Rail Fencing For Cat
Rule # one with cats: they will find a way!!!, just to spite you.
I found these on a popular home store site and could be a solution. You might have to do some cutting but you could fasten them to the deck railing with some strong cable ties.