What makes bash forget the environment variable?

This seems to depend on the system. I tried out with WSL2 and this doesn’t work there. I had to use the triple escape version

run(`bash -c "echo \\\${PATH}"`)

here also.