Device with Multiple Switches

Hi, is there any way to sync between the physical switch state to virtual switch?
I have the situation like this: I turn off the virtual switch by alexa, later, I turn on physical switch. after that, If I use Alexa to turn off the virtual switch, it says ok but didn’t do anything because the virtual switch is off already.
I have read another post that can sync two switches but it not for multiples switches device:

I’m don’t know about this coding language so I don’t know if it can be use here.

Why not create a Routine or Piston in SmartThings that when Physical Switch is turned on, set Virtual Switch On as well.

I’m assuming that you already have a Routine created in ST for when Virtual switch is turned off either via Alexa or manually changing it to Off in ST that the Physical Switch turns Off.

Thank for your reply,
But I’m looking for solution for multi-switches devices. I will try to find out if I can do it with Webcore.