Docker build multistage - failed to compute cache key

I have a similar problem when doing a multi-stage build on Ubuntu on WSL2 on Windows 11 with Docker Desktop.

My Dockerfile

FROM node:latest as builder
WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN npm run build
RUN cp -r /usr/src/app/.output/ /output/

FROM node:latest
WORKDIR /usr/src/app
COPY --from=builder /ouput/nitro.json .

I open Ubuntu, then docker build to stage ‘builder’ and start a container from that image manually in the Windows interface of Docker Desktop. I have confirmed that the build-image contains the file /output/nitro.json.

Then I do a docker build for the whole file. Still COPY --from=builder /ouput/nitro.json . gives the following error

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref c290b074-c322-479c-b461-44419293caef::te2yh1nks699h0puaas9890vq: failed to walk /var/lib/docker/tmp/buildkit-mount2099609999/ouput: lstat /var/lib/docker/tmp/buildkit-mount2099609999/ouput: no such file or directory

It seems like the COPY --from command tries to pull the files from a folder that does not exist in the Ubuntu-context.