From what I know it’s default behaviour, dictated by Athom; possibly designed like that to prevent accidentally (un)lock actions.
Developers can’t work around it.
The only way to circumvent it is to add a virtual device and have it control the lock like a switch.
Example:
https://community.homey.app/t/homey-dashboards-megathread/116963/1261