I don’t know where you live. You might contact your animal control and see what kinds of critters they deal with. Even in suburbia most of us have raccoons, possums, skunks, bobcats, snakes, foxes, hawks, owls, and weasels. Many of us also deal with coyotes, mink, wolverines, badgers, bears, eagles, and who knows what else. In suburbia dogs are probably one of your worst risks.
Many of those predators can jump or climb a 5’ high fence but it will slow down or stop many things. A strategy a lot of us use is to enclose them in a predator resistant run during the day and lock them safely in a predator proof coop at night. This is not a 100% guarantee that nothing will ever get a chicken, but it really does help your odds.
Can they fly out of a 5’ high fence? Yes, they can if they are motivated. I keep mine in a 4’ high electric netting out in the country and they don’t fly out. They have lots of room and no reason to fly out. I have had them fly out of a run with 5’ high fencing. I think a hen was trying to get away from an amorous rooster and learned she could fly out if she wanted to. I can’t tell you if yours will fly out or not.
One thing I suggest. Chickens like to perch. If you have a top rail or the top of a fence post that looks like a good perch, chickens are likely to fly up there just to perch. There is no telling which side of the fence they will come down on. If the top of your fence is wire, they are a lot less likely to fly up there.
I can’t give you any guarantees. You are dealing with living animals with the chickens and the predators. I don’t know what either will choose to do. Many people are successful keeping chickens so you can do it. Exactly how you set up depends on your circumstances and you. There are always risks involved no matter how you approach it.
Good luck!