Just a bit of in-universe history for color:
It's much too long to include as a quote - but the first chapter of the new canon book "A New Dawn" features a pre-Order 66, youngling Kanan having a conversation with Obi-Wan. It describes that the beacon was originally intended to be a 'return to Coruscant' signal but Kanan suggested that it could be used to send any kind of message - including a 'stay away' message. Kenobi was intrigued by the idea. It is possible that he made the necessary accommodations sometime after this and thus, it was an easier task to execute than may be thought.
Obi-Wan wasn’t looking at her. He was staring back at the beacon, too,
now, contemplating. “No, no,” he finally said, gesturing to the crowd
without turning. “Please wait.” He scratched the back of his head and
turned back to the gathering. “Yes,” he said, quietly. “I suppose it
could be used to warn Jedi away.”
The students fairly rumbled with discussions in reaction.
Warn Jedi away?
Jedi didn’t run! Jedi rushed toward danger!
Jedi stood, Jedi fought!
The other Masters stepped in, beckoning to Obi-Wan. “Students,” said
one elder, “there’s no reason to—”
“No expected reason,” Obi-Wan said, pointing his index finger to the
air. He sought Caleb’s gaze. “Only what our young friend said:
A hush fell over the group. Caleb, reluctant to say anything else, let
another student ask what he was thinking. “What then? If you send us
all away, what then?”