You can also string twine in multiple directions over a chicken run to make it so that their wing spread is too big to fit between them.
They can judge their space and if they can't fly in, they know they can't fly out.
It's easier and cheaper than netting although netting isn't that...