@netlify/plugin-nextjs v5.x.x overrides "Publish directory" and does not respect "absolute" or "relative" path given in netlify.toml

During upgrade from 4.x.x to 5.x.x version of @netlify/plugin-nextjs package we have stumble upon the issue with handling our pnpm monorepo config.

We have a simle multisite setup

./
   ./integrations
      ./site-1
         package.json
         netlify.toml
      ./site-2
         package.json
         netlify.toml

Where each netlify.toml looks like this

[build]
  base = "/integrations/site-1"
  publish = "/integrations/site-1/.next"
  command = "pnpm build"

[[plugins]]
  package = "@netlify/plugin-nextjs"


I am running netlify deploy --build --debug

And I can see that Netlify native resolved config is

❯ Resolved config
  build:
    base: /REPO_ROOT/integrations/site-1
    command: pnpm build
    commandOrigin: config
    publish: /REPO_ROOT/integrations/site-1/.next
    publishOrigin: config
  plugins:
    - inputs: {}
      origin: config
      package: '@netlify/plugin-nextjs'

But after nextjs was built during postBuild event I see that plugin has updated config (check publish and how path is duplicated

  Resolved config
  build:
    base: /REPO_ROOT/integrations/site-1
    command: pnpm build
    commandOrigin: config
    publish: /REPO_ROOT/integrations/site-1/integrations/site-1/.next
    publishOrigin: config
  plugins:
    - inputs: {}
      origin: config
      package: '@netlify/plugin-nextjs'
  redirects:
    - from: /_next/image
      query:
        q: ':quality'
        url: ':url'
        w: ':width'
      status: 200
      to: /.netlify/images?url=:url&w=:width&q=:quality
    - from: /_ipx/*
      query:
        q: ':quality'
        url: ':url'
        w: ':width'
      status: 200
      to: /.netlify/images?url=:url&w=:width&q=:quality
  redirectsOrigin: inline

Everything works fine using 4.41.3 plugin version

The plugin doesn’t manipulate the publish path itself. Could you let us know the site name or a way to reproduce the issue?