'customWorkspace' and 'ws' is basically the same, it will allocate the workspace with given path and the result will be the same as I described it in my ticket: P4_ROOT will point to the value of WORKSPACE env var.
I think I did not explain my scenario good enough and the use case in which this behavior is problematic. In our pipelines we use mostly static workspace's and preview as an operation. The rest of p4 operations like: sync, unshelve, revert etc. is done by the bat steps and p4 cli tool, as we would like to have total control of all perforce related operations. We use P4 Plugin mostly to read the head of the client and for all the Jenkins changelog related features. We now have a scenario where workspaces are located inside the folder junctions and p4 operations fails due to wrong pwd (Symbolic Links and Workspace Roots), so getting the real p4 client root with use of plugin in P4_ROOT env var would be really helpful here.
It means also also that description for P4_ROOT is very misleading (from P4 Plugin documentation):
P4_ROOT - The Perforce client workspace root path.
It is not perforce client workspace root path, it is the Jenkins build workspace root path.