While writing up this question, I discovered that ""/usr/bin/python3": not found" is actually the problem. I happen to have symlinks in my node_modules
$ find ./node_modules/ -type l -ls | grep python
53108278 0 lrwxrwxrwx 1 user user 16 Sep 10 2023 ./node_modules/cpu-features/build/node_gyp_bins/python3 -> /usr/bin/python3
53108265 0 lrwxrwxrwx 1 user user 16 Sep 10 2023 ./node_modules/ssh2/lib/protocol/crypto/build/node_gyp_bins/python3 -> /usr/bin/python3
I guess buildkit changed how symlinks are handled, but fails to provide adiquate error messages. (I still normally use DOCKER_BUILDKIT=0 because the output is more useful).
But then WHY does COPY package.json node_modules/ ./ work???