If the team loses Ray it's because either a) he doesn't want to stay, or they aren't comfortable with his contract demands and see better options on the FA market. They're not going to lose Ray because of Berrios. He just gives them the flexibility to not be desperate to retain him at all cost.
Like, is the Berrios trade acceptable if they sign Ray, but unacceptable if they let him walk, get a comp pick, and sign Scherzer or Gausman?