PARIS — The group of transgender prostitutes working in the Bois de Boulogne, a wooded park in western Paris, had a rallying cry for when they needed help. “¡Todas!” they would shout. “Everyone!”

It was a call for help the Latin American prostitutes knew all too well, and one they heard one night in mid-August, when Vanesa Campos, 36, a Peruvian working in the area, was shot and killed as thieves tried to rob her client, who survived.

“To die in a bush like that is no life,” lamented Giuliana, a 38-year-old Peruvian who gave only her first name, fearing for her safety. She and others working in the park that night had rushed to help Ms. Campos, but were forced to retreat when they heard shots being fired.

For many prostitutes in France, the death of Ms. Campos is proof of the growing dangers they face since Parliament passed a law in April 2016 penalizing those who pay for sex rather than those who provide it.