When Pipeline is running in Multibranch mode, the workspace directory is extremely long due to the inclusion of a full GIT hash (52 characters), such as: "/home/jenkins/workspace/funk_experimental_lauenburg-XCXMZWWG24Y2ZJAFNYCNOHRMYYWMVD5GBJJRU75H46UN5SAKC44A/master"
This easily triggers Linux's limit for a shebang on shell scripts (e.g. when creating a Python virtualenv) that are created as part of the build process if they include locally scoped paths, usually causing errors mentioning a "Bad interpreter".
Considering the extremely small limit of Linux in terms of shebang length, I propose Multibranch does not waste almost all of it on git hash and branch name and useses a tempdir concept instead.
This is documented in dozens of pre-existing issues (if you do a web search for jenkins multibranch bad interpreter):