Virtual Lock

I have Schlage Encode locks in my home. I created a virtual lock so I can lock them. The problem I am having is if I unlock it manually, Hubitat keeps the virtual lock as lock so I am will not be able to lock the door again. How can I have it change to unlock or is there a work around ?

How is your virtual lock tied to the real device? Does that integration (I assume IFTTT or Alexa or similar) have a way to get lock status back into Hubitat? Another automation on that side could do the trick if so.

Thank you.