Have spent 2+ hours with wix support on this - my issue is that in my particular case, dynamic page links go to a combination of the custom error page and the target page creating a mangled version of both. Removing the custom page results in normal behavior.
That’s also a known issue. Back then I asked Wix Support about this weird mix, and I got the stupid answer “Please provide the page name” (I told you it’s page 404, why are you asking for page name???)
So I just deleted my custom 404. It looks like they released this feature without QAing it.