Taffy at 4 months would take off to. It was likke a game to her. Use to scare the lliving crap out of me. I would try to catch her. Our yard isn't fenced in. I would pick her up before I went outside or to let anyone in.
Now through when she sneaks out I just look at her and tell her thats it I'm Leaving her. Boy does she comes flying by me to get in the house fast...
Then I tell her she's a good girl.
But all the other suggestions everyone been giving you are great ones.
Good Luck.
Star Taffy and Baby's mom