Yes it's a hardcore feature, your companions CAN die to the enemies. But thereThere are various other ways that companions can die. They can be killed while they are not your companions. So, before getting them, or after dismissing them.
There are also some reports that companions can be killed in casual mode by doing massive damage to their bodies when they are knocked down. This is probably a bug.