This is notation that bypasses the distribution (similar to moments)
As can be seen from the formula, the entropy is fully determined by the probability distribution of the random variable, not the random variable itself. In the formula you give in your question the object $X$ is used as an index of summation, so the summation does not depend on $X$ (it is "summed out" of the equation). (Note that it is bad notation to use the same notation for the random variable and the index of summation.) The notation you are referring to is similar to the notation for the moments of random variables, which are also fully determined by the distribution of those random variables. I will try to explain the alternative notational methods here.
Two possible notations: If you take $Q$ to denote the mass function of the random variable (and let $\mathscr{X}$ denote its support) then a natural notation for the entropy would be:
$$H(Q) \equiv - \sum_{x \in \mathscr{X}} Q(x) \log Q(x).$$
However, if you accept the notation for moments, you could also reasonably denote the entropy as:
$$H(X) \equiv \mathbb{E}(-\log(X)) = - \sum_{x \in \mathscr{X}} Q(x) \log Q(x).$$
These two alternatives frame the notation either as a function of the distribution, or a function of the random variable. In the latter case we use the same notational convention used for moments of random variables, which are also functions of the underlying distribution of the random variable.
Technical issues with moment notation: From a technical perspective, a random variable is a mapping on the sample space. If we are working in the probability space $(\Omega, \mathscr{G}, \mathbb{P})$ then a random variable is a measureable function $X: \Omega \rightarrow \mathbb{R}$ from the sample space to the real numbers. Importantly, the random variable does not contain the information on its own distribution, so it is impossible to define the entropy of the distribution ---or any moments of the distribution--- purely as a function of the random variable. It is possible to obtain the probability distribution from the random variable $X$ and the probability measure $\mathbb{P}$, so such a function can have both arguments, but it cannot be a function only of the random variable.
This means that whenever we use moment notation (where we express moments as a function of the random variable rather than the distribution), the functions must be implicitly conditional on the underlying probability measure $\mathbb{P}$ or the specific distribution of the random variable in question. Sometimes we have a function where one or more arguments are only implicit, and do not appear in the function notation, and so it is certainly possible to write moments (and the entropy function) in this way. It is in common usage in statistical problems.
This notation is a convenience because it allows you to relate the moments/entropy directly to random variables rather than their distributions.