The best workaround can fail if you don't have good communication, so that should be your first line of attack. The Aeon siren is considered one of the best repeaters by several posters including myself.
In the interim, you can try using repeat. You can get complex. For example, call a second program such that if the conditions are met disbles the repeat program. And a program that enables the repeat program when the door is unlocked.
Lock Program
If
door is closed
and lock is unlocked
Then
repeat x times
lock the lock
run disable program
Disable program
If
door is closed
and lock is locked
Then
disable lock program
Else
run lock program
Unlock program
If
door is unlocked
Then
enable lock program