how to make an inventory like in hello guest?

What to do if the characteristics of an item are reset after destroying actor
For example, I need a key with a keycode variable to retain that variable after deletion and for the new key spawned by the drop function to have the same characteristics as the key that was picked up.