Yes a fetus can die inside the womb and not be a miscarriage.
When a fetus does die in the womb suddenly without you knowing it the term for the baby dying in the womb without knowing it is called intra-uterine fetal death.
So it can also be considered miscarriage when the baby dies in your womb but does not discharge from the women's uterus.
However the baby can die before it develops fully and not discharge but not miscarry.
It's rare that a baby dies in the womb and doesn't develop fully but it can and does happen from time to time.
But when you do miscarry a baby you're usually more fertile and can easily get pregnant again afterwards.