SetHappiness() is pretty much a pointless function as it directly updates an internal variable that's re-calculated/overwritten frequently (eg when the player adopts a policy/belief, finishes an improvement, completes a building/wonder, at the start of every turn, etc)
It's possible that your changing this internal variable and then the game core is immediately recalculating it
Try calling the event that updates the top panel directly via Events.SerialEventGameDataDirty(), or in LiveTuner select the TopPanel context and call the function directly via UpdateData()