Discovered that PyLance was not enabled on the extension and when I enabled it then I saw that there were hundreds of warnings...
So I fixed them all.
This should help with various edge cases and random bugs, since this is a big rewrite expect some things to break...
Also changed the logic of locks so that they are considered as temporary unlocking locks if the lock status cannot be retrieved.
Have fun!