This bit pops out at me:
I seem to vaguely recall that setting an object active/inactive multiple times in the same frame doesn’t work; it doesn’t fully change status until you give it a moment to react. Even if it did work, SetActive changes the value of activeSelf, but you are returning it to the old value of activeInHierarchy, so this isn’t the proper way to return it to its previous setting.
Also, I’m having trouble imagining what motivated you to try this in the first place, especially given that the openProfile() function is just calling SetActive(true) when you’re done.
Regarding your larger problem, I’m not understanding the details.
You contrast debugging with “in the editor”–are you only debugging standalone builds? Is the visible behavior different in standalone builds compared to running in the editor? Is the visible behavior different depending on whether you step through in a debugger versus letting it run uninterrupted?
You say you don’t see changes to variables, but you show code changing a property (technically not a variable) that should have visible effects on rendering the game screen. Are you checking the output by looking at the game screen, or by looking in the inspector window, or with Debug.Log calls, or what? (Consider doing all of the above, if you haven’t.)
Is profileGO active or inactive prior to you clicking the button for the first time? Are the results of the SetActive part visible immediately, even when the text is not? Does that object (or any of its children) have code in Awake, Start, or OnEnable that might directly or indirectly affect the text fields?
If none of those questions jars anything loose, I might Debug.Log the value of a text field right before you set it, right after you set it, and also every frame in an Update function somewhere. If everything were working correctly, you should see it output its old value before the set, and the new value after the set, and in every Update call thereafter. If that is what you actually do see, that suggests your data is being updated correctly and you have some sort of display problem. If you see something else, that points to a problem with your data either failing to change or being reset after you change it, which will narrow down where you should look for the bug.