settings – Any way to preserve portable hotspot configuration (SSID, key)?

How can I preserve my initial portable hotspot configuration (mainly current SSID, encryption) settings on my device. I noticed when I use 3rd-party applications (such as WiFi transfer, Mi Drop etc) my hotspot configuration gets messed up and worse deletes the previous encryption, sometimes I only find out later that situation.

So in case of unattended session, I would love to preserve my initial config, to prevent unauthorised access to portable hotspot, which could incur significant data charges. Is there a way to achieve that (Running Android 7.0, Miui 11)

I had automation in mind to restore back to original setting, (but can’t figure out full workaround) where the trigger type is WIFi tethering state → Enabling(but the limitation here I can’t put the desired config rather its just an on switch AFAIK but I may be wrong)

enter image description here