I have discovered that when you attempt parallel routing using a slot (or multiple), attempting to access a route that does not exist will no longer render the not-found.tsx file in the app directory if the user is currently in a slot route.
In the RootLayout, if you add a slot and conditionally render it (say through authentication or even a simple boolean), unless the initial ReactNode is {children}, the not-found.tsx will not load.
import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
export default async function RootLayout({
children,
active
}: Readonly<{
children: React.ReactNode;
active: React.ReactNode;
}>) {
return (
<html lang="en">
<body>
{true ?
<>
{active}
</>
:
<>
{children}
</>}
</body>
</html>
);
}