This is expected behavior. If you change widget options on fly, those changes are not permanent.
To get your last options back after tab change, use ui_control
node. ui-control
node fires message on every new dashboard connection as well as at every tab change. This way you can collect last known option data and send it to the ui-level node right after such events happen so the ui-level will be always with up to date options.
Example flow:
[{"id":"29e44bca.6d2594","type":"inject","z":"5f1bed63.cb2a94","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":"0.62","x":200,"y":170,"wires":[["158f5773.e739c9"]]},{"id":"158f5773.e739c9","type":"random","z":"5f1bed63.cb2a94","name":"","low":"1","high":"10","inte":"true","property":"payload","x":360,"y":170,"wires":[["8e83f123.8bd27"]]},{"id":"8e83f123.8bd27","type":"ui_level","z":"5f1bed63.cb2a94","group":"e6872d71.b8a78","order":2,"width":"3","height":"5","name":"","label":"","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"10","segWarn":"2","segHigh":"8","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"peaktime":3000,"x":600,"y":170,"wires":[]},{"id":"eb0fdb28.9d0af8","type":"change","z":"5f1bed63.cb2a94","name":"change ui-level options","rules":[{"t":"set","p":"control.seg2","pt":"msg","to":"6","tot":"num"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":90,"wires":[["8e83f123.8bd27"]]},{"id":"cd17881c.b82f98","type":"inject","z":"5f1bed63.cb2a94","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":110,"wires":[["eb0fdb28.9d0af8"]]},{"id":"7067bfc4.a1657","type":"ui_ui_control","z":"5f1bed63.cb2a94","name":"","events":"all","x":180,"y":50,"wires":[["eb0fdb28.9d0af8"]]},{"id":"e6872d71.b8a78","type":"ui_group","z":"","name":"Default","tab":"8fcdaa26.bd37d8","disp":true,"width":16,"collapse":false},{"id":"8fcdaa26.bd37d8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]