You used a good word in your question “discourage”. Thank you. Most people on the forum are looking for absolute guarantees, with living animals you don’t get that. As Mary said it depends, we can’t give guarantees on this kind of stuff. But we can give suggestions.
My electric netting is 48” tall, it keeps my full sized fowl in most of the time. These chickens have no problems flying up to my 5’ high roosts, they could easily go much higher if they wanted to. The key to keeping them in is to not motivate them to get out.
The only time I have any problems keeping them in is when one gets trapped against the fence and they are losing a conflict. I have twice had a hen get trapped and go vertical to escape an amorous rooster and come down on the wrong side but twice is really rare. More often it’s when I have adolescent cockerels that are fighting to decide which is boss. If the loser gets trapped against a fence they will go vertical to escape and might come down on the wrong side of the fence. That used to happen fairly regularly but I’ve learned a few tricks that really reduces it. Don’t build sharp corners where they are likely to get trapped. Don’t build narrow areas. I used to configure my netting in narrow channels to get to better forage. If instead I spread it out to enclose wide areas very few get trapped against the fence.
You mention that yours free range so I anticipate that they have a lot of room. And it sounds like you have an all-female flock. It’s highly unlikely one of yours will get trapped in a conflict against a fence.
What kind of fence you have is important. Chickens like to perch. They love to fly up on things and just sit there. If your fence has a solid rail at the top for them to perch on they are likely to fly up there. Who knows which side they will hop down on, I don’t. But if the top of your fence is wire, they don’t have a good perch to land on. So build your fence so the top of it is wire, not something solid to land on.
On uneven ground it is very possible there will be gaps at the bottom of the fence. Especially if the fence row is shaded, the chickens might like to hang out there, hiding from hawks and scratching for those delicious creepy crawlies or other treats. Don’t leave gaps big enough for chickens to walk through at the bottom of the fence. Your fence is just to keep the chickens in, not to keep other critters out, so this is probably not a big concern to you. But with my netting and uneven ground it’s something I consider.
Unless you have birds that cannot fly, like Silkies, you’d be surprised how high even a huge breed can fly if they are properly motivated. It’s not a big deal for a bantam to fly up fifteen feet to get to a preferred roost. Don’t rely on the height of your fence to keep them in, rely on the type of fence and try to not motivate them to fly over it or on top of it. A four feet high fence with a wire top should work really well.
Good luck!