It seriously considers whether it should hit the ocean. It is a matter of evaluating which option will do the least harm, and how much it can affect its trajectory.
Additionally, there is some time pressure to the decision, because small adjustments to its trajectory will have a larger effect if initiated earlier. It performs a sequence of planning rollouts over possible trajectories, and picks the one with the lowest 90th percentile cost.
It will be aiming to pass to the left side of the ocean-bearing continent, far away from the islands and in a generally uninteresting area. If it cannot miss the continent for some reason, it still has some time to attempt to divert toward the central ocean as a fallback plan.
Now, it is just left with the problem of accomplishing that plan.
The thing is, P.E.R.C. probes are not atmospheric vehicles. They are designed to spend their entire lives in space, and even moderately dense nebulae are an obstruction. So P.E.R.C. is not equipped with aerodynamic control surfaces or the planning software necessary to use them. What it does have are two antennas.
With both its solar panel assemblies extended, its flight has mostly stabilized, with its cylindrical body presenting a square cross section to the continents below. Its retractable antennas extend along the same axis as its solar panels, and, critically, extend using linear feed motors rather than the unfurling action of the solar panels.
It extends its starboard antenna assembly, increasing drag on that side. In turn, that causes P.E.R.C. to rotate slightly, increasing the lateral force generated by the solar panels and causing it to skate to the port side.
It builds a dynamical model of the situation, carefully extending and retracting the antenna to work its way in the right direction. It's a tiny amount of additional drag, and so a tiny amount of sideways force to work with, but even small forces can move massive objects given enough time. It has more of a problem with the turbulence and unpredictability of the atmosphere adding noise to its measurements. Sometimes, the wind turns it the wrong way, and it has to carefully work its axis around until it can glide in the right direction again. Sometimes there's an updraft and it has to compensate suddenly.
And, of course, the antenna actuator is not designed for repeated small, careful movements against a stiff resisting force.
So it falls, its fusion reactor keeping the computer core fully powered so that it can focus all of its attention on this one, most vital task. It watches the rocks and winds below, and it nudges itself oh so carefully, so gently, as far away from any of the aliens as it can.