We don’t know
We’ve seen various people use this phrase throughout the Star Wars films and books. Crucially, most of the people who say it don’t have any particular Force powers, so they aren’t likely to be influencing the Force directly. If it works, it’s because the Force is listening.
The main issue is that it’s next to impossible to conclude from the information we do have that this benediction resulted in more favorable outcomes for its recipients. Consider, for example, Chirrut Imwe from Rogue One. He chants “The Force is with me and I am with the Force” (a similar phrase), then walks slowly, unarmed, across a chaotic battlefield, and turns off a switch:
“I am one with the Force,” he said again, “and the Force is with me.”
The words echoed inside him. I am one with the Force and the Force is
with me.
Baze yelled his name from the bunker. Chirrut did not stop.
He felt hot bolts whip past him, heard leather gloves squeeze metal
triggers, and turned his body as if shouldering his way through a
crowd. He tapped the heel of his staff, feeling his way toward the
console by the traces of buried cables. He listened for telltale
echoes, where the noise of the battle resounded off terminals and
equipment.
He did all this without thinking. The art of zama-shiwo, the inward
eye of the outward hand, attuned his breathing and heartbeat to his
chant. It was his chant that guided his motions, controlled his pace
as he strode forward. I am one with the Force and the Force is with
me.
Rogue One: A Star Wars Story
Was the Force with him, because he improbably walked across a battlefield and did not die? Was it with him, because he accomplished his objective of flipping the switch? Was it not with him, because immediately after flipping the switch, he was hit by a blaster bolt and killed?
Ultimately, it’s impossible to say whether saying “May the Force be with you” works, because we have too few examples, and those that we do have are generally a mixed bag of success and failure. All we can say is that the phrase expresses the sincere wish that the Force be with the recipient. Whether the Force takes that into account is unknown.
That's not how the Force works!