The green and yellow keys are more bulky, so, when the monsters stumble upon them, they don't know what to do with them, so they avoid/go around them (like when you're walking through a forest, and decide to avoid random branches to avoid tripping over them). The red key is more flat and lighter, so they don't hesitate to step onto/over them. The blue key is more similar to the red key, but it was unknowingly painted with a dye that is edible for monsters, and that they in fact love, so they end up just swallowing the whole key.
Why do blocks also make blue keys disappear?
Why do blocks also make blue keys disappear?