Want a better looking 404 page for modern communication sites, I have found a way to set a modern page to be the 404 page at the site collection level. We have known for a while now, that classic SharePoint sites support custom 404 pages and redirects to the PageNotFoundError.