Always keep the lockbox open after you take the key, once you are done return the key back in the lockbox and close it.
Note: Property managers will never ask you to take the key from the lockboxes. If someone instructs you to do that, you are in touch with a scammer. Return the key to the lockbox and block all communications with them.
If you don't return the key, you will be held accountable and be charged for it.