As you mentioned it works whenever you include the proper PR/Build url, it seems the problem is with the pattern you inserted.
You can try using this regex, for example, considering the changing data in the URL will be non numeric:
/https:\/\/my-site-[A-Za-z]+--pr[A-Za-z]+\.web\.app/g