I have the same challenge with not having a variable that shows in the "web console" name available at all - just because I choose a multi-branch pipeline (and wish to use declarative pipeline code.)
I am using the same Jenkinsfile for multiple defined projects where it uses this console name as the only variable to know what to do per job type. (parallel pipelines would make things over complex).
What makes this worse is that in a declaratively coded pipeline, I cannot recapture this variable for the entire pipeline in an "Enviornment" block because as far as I know, it does not have any parsing capabilities.
So it forces me to resort to a regular imperative pipeline so I can use the script solution posted in this thread by Nuno Costa.
I can understand it may be impossible to use the JOB_NAME variable to keep the web console name when doing multibranch - but could you establish another variable that holds just that name? Then at least I could covert existing pipeline scripts to declarative.