Continuing the discussion from Enter-key not recognised (in Rhino 5 for Windows):
I had the same problem when using ‘setusertext’ + grasshopper(python script).
1/ long winded way: set all user text attributes before opening ghp.
2/ Quick way: Right click on ghp, recompute. That seemed to work for me.