Cover is not necessary to hide
The rules for Hiding state:
You can't hide from a creature that can see you clearly
What Can You See? One of the main factors in determining whether you can find a hidden creature or object is how well you can see in an area, which might be lightly or heavily obscured
Normally when a creature hides behind an object they have complete concealment. Any attempt to locate them with sight fails. But this doesn't actually cause any disadvantage most of the time. The locating creature uses their normal perception score, because they can still hear or otherwise sense the creature.
You can hide in line of sight
In many situations you can hide in direct line of sight. For example in fog, dim light, heavy shadows, rain, foliage, darkness, etc. The key is not to be clearly visible.
Even if the Warlock can see through the crate that a Goblin is hiding behind, they may not even be able to distinguish the Goblin from the "ghostly, transparent images". It is up to your DM to decide.
Darkvision isn't all that useful for locating hidden foes
As above, locating a hidden foe is not a sight based check, it is a combination of all senses. Darkvision doesn't give any advantage.
The rules for vision and light state:
A given area might be lightly or heavily obscured. In a lightly obscured area, such as dim light, patchy fog, or moderate foliage, creatures have disadvantage on Wisdom (Perception) checks that rely on sight.
They go on to explain how Darkvision works:
Many creatures in fantasy gaming worlds, especially those that dwell underground, have darkvision. Within a specified range, a creature with darkvision can see in darkness as if the darkness were dim light, so areas of darkness are only lightly obscured as far as that creature is concerned. However, the creature can't discern color in darkness, only shades of gray.
Unfortunately, having disadvantage on sight is a clear indication that you cannot see "clearly". Sure, it's better than automatically failing vision checks, but like I said, you probably don't have to rely purely on vision. Darkvision is at disadvantage, so it is strictly worse than just listening.
Devil's Sight is better than Darkvision, but it's still only niche
Luckily Devil's Sight is not Darkvision, but that only helps if an enemy is hiding only in the shadows. If they are hiding behind something, or in fog, then it makes no difference.