tibco/tra/domain/[ENV_NAME]/datafiles/[my app]_root is actually right place where all Global variables values and package code are stored after package deployment.
I am guessing you are looking to the wrong package or something wrong with the deployment.
All global variables should be stored in
[my app]_root\defaultVars\defaultVars.substvar
or subfolders
[my app]_root\defaultVars\[folder_name]\defaultVars.substvar
the variable can be deployment settable and service settable. Please see more details here https://community.tibco.com/questions/difference-between-global-variables-earservice-and-service-instance-levels
Also there are several ways global variables can be overridden. Please see https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-47854
1). In Designer -> Global Variables panel, click the pencil icon (Open
Advanced Editor) at top right, select the global variable and right
click -> “Override Variable”.
2). Use the Project -> “Save as” option to save as a new project.
Global variables will then be editable.
3). Go to Tester -> "Advanced" test settings with the "-p
PATH/properties.cfg" argument, with PATH being the absolute path and
properties the file that override global variables.
4).Change the variable in TIBCO administrator GUI during deployment.
5). Manually edit the bwengine.tra.