Mechanical keys can be collected. Programmed credentials have to be deactivated, and that is a different task with a different owner.
A building fob is usually managed by the property manager, who can disable a specific fob without affecting anyone else. A garage remote may have no such control: many older openers simply respond to any remote that has been paired, so the only way to remove one is to clear the opener's memory and re-pair the remotes you still hold.
Ask at the end of every tenancy which credentials existed and whether each was returned or deactivated. A fob handed back and never disabled is still a working credential if it was copied, and cloning building fobs is straightforward with commonly available equipment.
Keep the deactivation date in the file alongside the key list. It is the part that gets forgotten, and it is the part that is not solved by a bundle of keys on the counter.
Where a tenancy ends badly, keep the key question separate from everything else in dispute. Returning keys and getting a receipt costs a tenant nothing and removes one argument from a situation that may already have several. The same applies in reverse: a landlord who documents what came back has one fewer thing to reconstruct later.