Does Google Apps Script Session Information Work Different for Gmail accounts vs other Workspace Domain Accounts?

I’m writing a signoff script in Google Apps Script for GSheets that allows users to select their name from a dropdown list in a cell, then if the name matches the currently active account, another function will run to lock the row etc. Everything is working perfectly on my gmail account, but when the client tries to run the script using an account managed by google but with a non-gmail domain, the email address check fails. I’m waiting on the client to send me the log info as I don’t have permissions to access it in their file, but wanted to see if anyone else had run into this issue.

In the example code with modified company and username, the code does NOT work, but if I set atDomainString to “@gmail.com” and name to my gmail address and run under my account, it does.

const atDomainString = "@redactedcompany.com";
const name = "JSmith";

    function userMatchesSignature(name) {
      let user = Session.getEffectiveUser().toString().toLowerCase();
      let signUser = (name + atDomainString).toLowerCase();
      Logger.log("User: <"+user + "> vs <" + signUser +">");
    
      return user === signUser;
    }