It's not whether its 'that' or 'which' - in the original post, the tenses are mixed:
The box has a lid that kept things dry
The box has a lid that keeps things dry
The box has a lid which kept things dry
The box has a lid which keeps things dry
See what I mean? The lid surely continues to keep things dry - unless the lid is damaged, which would read 'the box had a lid that kept things dry until it was broken etc.'
This works even if the box is empty, meaning that even if the keeping of things in the box was something that happened in the past, the inside of the box continues to be kept dry because the lid is the important aspect of the box, rather than the (dry) things inside it.
If it were about the things in the box, then the sentence would read:
Things in the box are/were kept dry because of the lid
I've just read this back and it reads so pedantically!