The Dennetian school of thought says that consciousness is an illusion. I think the popularity of this idea is mostly based on an wrong understanding of what it means to be an illusion.
When you perceive an object, 100% of the time the thing you see is not the object itself but your brain's reconstruction of the object. (This is indirect realism.) So in some sense, all perception is illusion. Still, we call some things illusions and others not. If I reach out for my now empty can of black tea and grab it as intended, we don't call it an illusion. If you see an oasis in the desert and run toward it but there's just sand, we do call it one. So what exactly does the illusion label mean?
I'd argue it means "the presumptive cause of the percept is different from the real cause". You thought that [the percept of the oasis] was there because [there's an oasis], but actually it was there because [some weird physics quirk that causes Fata Morganas]^1.
This definition seems to work across the board, e.g., visual illusions, dreams, libertarian free will, whatever. We call things illusions if we're wrong about what caused the percept.
Thus -- and this is crucial -- being an illusion doesn't mean the percept doesn't exist. The percept exists either way. In fact, you could construct two scenarios where someone perceives an identical percept, but in one case it's an illusion and in the other case it's not.
And this is why consciousness cannot be an illusion. The illusion property is all about the cause of a percept, which, in the case of consciousness, is irrelevant; the percept itself is the proof of consciousness. This makes it unique; in most cases, we care about what caused a percept, but for the existence of consciousness, it's just the percept itself.
There's this popular idea that the only thing you can know is that you exist. I'd challenge this; I'd say the only thing you know is exactly the precise nature of your current percept; some people also call this your "observer moment". So it's not just "there is a percept", but also what it is; you can't be wrong about there being the quale of red. You can only be wrong about what caused the quale. (You can be wrong about past observer moments since those are based on faulty memory.)
The idea that you can be wrong about the percept itself isn't even well-defined, like, that sentence doesn't map onto anything. Being wrong is a property of statements; you can only be wrong about [conclusions about the percept].
---
(1): Fata Morganas as understood in pop culture probably don't exist, but that's beside the point.