Worker (almost) break Page Rule not showing redirection on the browser

Hi there!

I’m beginning to work with workers to add security headers to the responses. I’m following this guide: The brand new Security Headers Cloudflare Worker. It works like a charm, but I found out when the worker broke the Page Rules in some way. Let me explain it.
I have a Page Rule to redirect every user that arrives at the root domain.xyz to a domain.xyz/path. When the worker is running, I can see the content of the web page is the content on domain.xyz/path, but the URL in the web browser shows domain.xyz. I reduced the code to the following, but it keeps showing the described behavior.

addEventListener(“fetch”, event => {
event.respondWith(fetch(event.request))
});

I know I can perform that redirection inside the worker, but I want to keep those rules under the Page Rules management.

Any idea what could I do?