Based on the pkexec documentation you can't do what you are trying. The environment is set to a minimal state that excludes the variables you are interested in.
If you want their values in your application, you will have to pass them as command line parameters.
However, based on the variable you are looking for, it seems you want to run a GUI as root, which is usually a bad idea.