How to change value of hidden field on node publish?
Piece of cake, if you are willing to use the Rules module for this ... like so:


Rules Event: before saving content, which covers all variations of updates of nodes, and creations of new nodes (and does not require an explicit "entity save" action).
Rules Conditions:


Entity has field, for your hidden status field, that way the logic implemented via this rules only applies for nodes that use this field.
Node-unchanged has status unpublished.
Node-changed has status published.

Rules Action: Set a data value, for your hidden status field, to assign the value 'published'.


With the above in mind, have a look at this rule (in Rules export format), in which I'm using a status field with machine name field_status (and for which a value of "P" reflects "Published" status:

 "rules_change_value_of_hidden_field_on_node_publish" : {
    "LABEL" : "Change value of hidden field on node publish",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_presave" : [] },
    "IF" : [
      { "entity_has_field" : { "entity" : [ "node" ], "field" : "field_status" } },
      { "NOT node_is_published" : { "node" : [ "node-unchanged" ] } },
      { "node_is_published" : { "node" : [ "node" ] } }
    ],
    "DO" : [
      { "data_set" : { "data" : [ "node:field-status" ], "value" : "P" } }
    ]
  }
}


If you adapt the machine name field_status to match your own field's machine name, together with the value used to reflect "Published" status, you should be able to import the above rule in your own site. After doing so ... you should be done!