A warning banner was added to the replicas to make sure users don't confuse GitLab replicas and production instance. The script which does the restore and banner creation directly calls GitLab rails command to create the banner:
gitlab-rails runner 'BroadcastMessage.create()
See gitlab-restore.sh. Afaik this endpoint in the rails console is not documented and may just be removed or deprecated in one of the last updates.
I tried running the gitlab-rails runner command manually and it returns the following error:
uninitialized constant BroadcastMessage
We might have to switch to the official API: https://docs.gitlab.com/ee/api/broadcast_messages.html