On Freestyle jobs defining a Jenkins global variable like this would work as expected:
Note: behavior is the same regardless if brackets are used or not when you define the variables.
Freestyle "set" result (correct):
Pipeline "set" result (incorrect):
This problem is essential because it prevents Jenkins administrators from using environment variables to fix/workaround execution problems.
Effectively this breaks any job that needs to define variables that are relative to something else, like workspace, home, ....