What follows may be slightly implausible, and requires multiple POD's. First, Robert Kennedy is selected by Joseph McCarthy, and not Roy Cohn. McCarthy's period of influence is probably longer without Cohn, for the simple fact that the Army-McCarthy hearings never happen. But McCarthy probably peters out anyway with Eisenhower in the White House. Perhaps I'm wrong, but my sense is McCarthy fades into irrelevancy soon enough, even without Roy Cohn. But Kennedy has made something of a name for himself with McCarthy. After his work with Senator McCarthy, he has a reputation as a virulent anticommunist.
Second, sometime after Robert Kennedy leaves McCarthy's service, but before the 1960 Presidential election, his brother dies. (Not sure how plausible that is, this is for the sake of argument.) RFK becomes the center of his families political aspirations while he is still associated with intense anticommunism in the public mind. He becomes a Senator as soon as it is practicable.
Senator Kennedy is viewed, thanks to his past association with McCarthy, as a very conservative Democrat, albeit one who is more flexible where Civil Rights is concerned than a Strom Thurmond.
Eventually, Senator Robert Kennedy, the arch-anticommunist, wins his party's nomination. Even though he is a Democrat, his anticommunist credentials are as unquestionable as Richard Nixon. When President Robert Kennedy eventually decides to reach out to China under circumstances similar to what was occurring under the historical Nixon Presidency, supporters within the President's political party say amongst themselves that "Only Robert Kennedy could have gone to China"
I know, serious plausibility issues. And I fully expect to be torn apart by those more familiar with Kennedy's biography than I.