Could you maybe modify stage 2 to:
FROM scratch as stage2 COPY ... COPY ... ...
FROM SCRATCH COPY --from=stage2 / /
Could you maybe modify stage 2 to:
and finally at the end: