i would either get new or second hand lock and replace it
the door card off
take plastic off
undo electric plug on bottom of lock
undo rods from handles and door snib (take off lock assembely)
unbolt it from rear of door where the latch is
pull it out
reverse
if every time you roll the latch over (with a screwdriver) it deadlocks
then i would suspect the spring for the dead lock arm is broken inside the lock i would replace it
leave door card off and check it opens close locks unlocks inside and outside handles work
and of course if the new one dead locks
good luck man!~