In the space battle scene, the Rebels lost 2 X-wings while attempting to enter the planetary surface. Why didn't they fly around it?
They can't go 'around' the shield because the shield encompasses the entire planet.
“What am I looking at?” she asked, squinting at the ring. She made out the specks of starships descending through its center, but then a shimmer outside the ring’s edge caught her eye—the subtly distorting gleam of an energy field.
“There’s a planetwide defensive shield with a single main entry gate,” Bodhi said. “This shuttle should be equipped with an access code that allows us through.”
The film's 'Ultimate Visual Guide' factbook makes it abundantly clear that the shield has the same strength all the way round and is otherwise "impenetrable".
Bodhi has a working familiarity with the Scarif approach — he's flown it over a dozen times before. However, his paltry security clearance means he has never set foot beyond a landing pad, several kilometers distant from the team's ultimate objective: the Scarif Citadel. One obstacle at a time is the only way to succeed in this foolhardy mission against overwhelming odds. Bodhi's clearance codes get the shuttle past its first obstacle—an otherwise impenetrable shield barrier that envelops the entire planet, save for a high-altitude gate station.