This is the process of insight. When you see into things, you see what makes up those things. If you disassemble a shirt into component parts, the shirt no longer looks or feels or seems like a shirt, even though all the parts are there. The shirt seems unreal.
Same way with reality. Deconstructing it into component parts causes reality to lose its structure. Then it seems as an illusion.
When you’ve deconstructed the self in this same way, you have what’s called a satori experience. Do this enough times in enough ways, and we call that enlightenment.