The easiest way for all your use cases is a virtual switch which then triggers an automation which does whatever you want, including change the STHM security.mode.
If you want to use it as a scene in order to make a widget out of it, just have the scene turn on the virtual switch.
I personally use the power allowance feature to have the virtual switch turn itself off again after a minute so it’s available for the next time, but there are also other ways to manage that.
It’s a little clunky, but it works.
If you have a one to one correspondence between location.mode and security.mode, Then you can just have an automation so that whenever location.mode switches to home, STHM security.mode switches to home, etc. but that doesn’t work for people who have custom mode like “dog walker” or “guest“, and so on.
For more information on running automations manually, see the community FAQ:
FAQ: How to Run Scenes and Automations (New V3 App) (2020)