Note: this answer contains spoilers for the episodes preceding S6E09, "Jennings, Elizabeth". Anything occurring in this episode or the following episode are in explicit spoiler tags; but references to the episodes before these are written in clear text.
The KGB was divided in its support of Gorbachev. Claudia was a member of the anti-Gorbachev faction within Directorate S (part of the KGB), but Arkady, who is the deputy chief of Directorate S by this time, supported Gorbachev. The reason that Arkady recruited Oleg to contact Phillip is that Arkady didn't know which of his staff he could trust; see their discussion in S6E01, "Dead Hand".
By the time of the finale, Phillip and Elizabeth know about this conflict between the pro- and anti-Gorbachev factions, and have effectively chosen to side with Gorbachev. Returning to the USSR is admittedly something of a leap of faith, since they don't know how widespread the conspiracy against Gorbachev is; but they seem to be assuming that it is a relatively small faction. And of course, they know enough information about the plot help expose it. The fact that Arkady is the one to greet them in the USSR seems to indicate that he still has enough power within the Directorate to protect them. Of course, they don't know this for sure until they get there; there is a moment of tension when they drive up to the border crossing into the USSR and the guard checks their papers. Presumably they would have been arrested upon arrival had the anti-Gorbachev faction held enough sway.
Besides, it's not like they can stay in the USA. In the same episode,
Phillip barely escapes from the FBI agents who are tailing Father Andrei, and gives Elizabeth the signal that it's time to bug out. This is of particular concern because Father Andrei saw their true faces and knows their true names from their wedding ceremony in the previous season.
And if this wasn't enough, in the next episode, after
Stan confronts them in the parking garage
they certainly can't stay in the USA. If they don't return to the USSR, their only other option is to live in a neutral third country; and even then, they might not be safe if the KGB really wanted to get their hands on them (witness what happened to Agent Gaad in Bangkok, back in Season 4.)