Repository: next.js
Issue: `/404` compiled as pages route
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP Thu May 25 07:17:40 UTC 2023
    Binaries:
      Node: 20.4.0
      npm: 9.7.2
      Yarn: 3.6.1
      pnpm: N/A
    Relevant Packages:
      next: 13.4.12
      eslint-config-next: 13.4.12
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: standalone
```

### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/icoretech/airbroke

### To Reproduce

clone the repo, attempt a build but there should be no need

### Describe the Bug

at first I wrote this next.js 13 appDir without a custom `not-found.tsx`, leaving the default.
in the build logs we can observe this:

```
#15 27.41 Route (app)                                Size     First Load JS
#15 27.41 ┌ ○ /                                      486 B          92.2 kB
#15 27.41 ├ λ /api/auth/[...nextauth]                0 B                0 B
#15 27.41 ├ λ /api/completion                        0 B                0 B
#15 27.41 ├ λ /api/hc                                0 B                0 B
#15 27.41 ├ λ /api/v3/notices                        0 B                0 B
#15 27.41 ├ λ /bookmarks                             3.5 kB          122 kB
#15 27.41 ├ ○ /icon.svg                              0 B                0 B
#15 27.41 ├ λ /notices/[notice_id]                   7.78 kB         127 kB
#15 27.41 ├ λ /occurrences/[occurrence_id]           13.1 kB         207 kB
#15 27.41 ├ λ /projects                              2.15 kB         121 kB
#15 27.41 ├ λ /projects/[project_id]                 9.34 kB         128 kB
#15 27.41 ├ λ /projects/[project_id]/edit            22.9 kB         216 kB
#15 27.41 ├ λ /projects/new                          7.21 kB        96.9 kB
#15 27.41 └ ○ /robots.txt                            0 B                0 B
#15 27.41 + First Load JS shared by all              80.9 kB
#15 27.41   ├ chunks/114-bd57f7329c784e37.js         26.3 kB
#15 27.41   ├ chunks/bf6a786c-0467ff1ae5f961b7.js    52.7 kB
#15 27.41   ├ chunks/main-app-46e10138c02ff0df.js    214 B
#15 27.41   └ chunks/webpack-e0cf9e931787387f.js     1.74 kB
#15 27.41 
#15 27.41 Route (pages)                              Size     First Load JS
#15 27.41 ─ ○ /404                                   182 B          79.9 kB
#15 27.41 + First Load JS shared by all              79.7 kB
#15 27.41   ├ chunks/framework-8883d1e9be70c3da.js   45 kB
#15 27.41   ├ chunks/main-7e37f7451a4c4039.js        32.7 kB
#15 27.41   ├ chunks/pages/_app-52924524f99094ab.js  195 B
#15 27.41   └ chunks/webpack-e0cf9e931787387f.js     1.74 kB
```

the interesting bit is that the `/404` route is compiled under pages app.

the first thing I tried is to create `app/not-found.tsx`, but it did not serve to replace that pages route, we just see this added:

```
#15 27.52 Route (app)                                Size     First Load JS
#15 27.52 ┌ ○ /                                      486 B          92.2 kB
#15 27.52 ├ ○ /_not-found                            0 B                0 B
...
```

### Expected Behavior

and this has caught my eye mainly because of a recent commit that gives processes names:

<img width="443" alt="Screenshot 2023-07-23 at 00 43 47" src="https://github.com/vercel/next.js/assets/12844/863cf82b-d96f-4e91-8972-57446f3daa69">

as you can see the standalone build is allocating a `next-render-worker-pages` and from my understanding just to serve a 404 route.

if that's the case maybe there's a way to avoid spawning extra processes.

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

kubernetes, standalone