I do believe you use Web App - Execute as - User accessing the web app. I tried your code and tested and got the same result as the sample picture given.
To make it work, Change the Web App - Execute as to Web App - Execute as - Me ([email protected]). Also Select Anyone in Who has access.
Execute the app as me — In this case, the script always executes as you, the owner of the script, no matter who accesses the web app.
Execute the app as user accessing the web app — In this case, the script runs under the identity of the active user using the web app. This permission approach causes the web app to show the email of the script owner when the user authorizes access.
You can read more about Web App here - Web Apps