There is a workaround for this issue https://github.com/janvrany/jenkinsci-unstashParam-library and in a pipeline script you do:
node { def file_in_workspace = unstashParam "file" sh "cat ${file_in_workspace}" } library "jenkinsci-unstashParam-library" node { def file_in_workspace = unstashParam "file" sh "cat ${file_in_workspace}" }