This official rules answer provides guidance:
Is the breath weapon of a dragon magical?
Our game makes a distinction between two types of magic:
- The background magic that is part of the D&D multiverse’s physics and the physiology of many D&D creatures
- The concentrated magical energy that is contained in a magic item or channeled to create a spell or other focused magical effect
In D&D, the first type of magic is part of nature. It is no more dispellable than the wind. A monster like a dragon exists because of that magic-enhanced nature. The second type of magic is what the rules are concerned about. When a rule refers to something being magical, it’s referring to that second type. Determining whether a game feature is magical is straightforward. Ask yourself these questions about the feature:
If your answer to any of those questions is yes, the feature is magical.
Let’s look at a white dragon’s Cold Breath and ask ourselves those questions. First, Cold Breath isn’t a magic item. Second, its description mentions no spell. Third, it’s not a spell attack. Fourth, the word “magical” appears nowhere in its description. Our conclusion: Cold Breath is not considered a magical game effect, even though we know that dragons are amazing, supernatural beings.