I think that when you call Environment.UserName
you get the value for the user impersonated by the current process, while if you call Environment.GetEnvironmentVariable("USERNAME")
you get the name of the user that starts the process and at that point the process is not started and, of coure, has not yet impersonated another user.
However, this is only a raw thought that seems to work for the OP question, but I still searching some reference material to confirm my assertion.
I welcome any one that has a better understanding of this fact and explain it better than me