Under "Connecting your infrastructure", click on "Prefect Server". You will then see "2. Connect the UI", and from there you can change the endpoint.
Another way would be to provide the URL when starting the UI, but then you wouldn't be able to switch on the fly.
But as I suggested earlier, it might suffice to have a prefect agent in region S instead of setting up a prefect server in region S. That way, your UI will connect to a single endpoint, i.e., the prefect server in region B that both the agent in region B and the agent in region S poll.