I don't know. It's like any addiction. Stop doing it and focus on other things. Particularly focus on attaching to reality. Look up mindfulness. Parse all the meditation and hokey shit and get to the part that's basically training your mind to focus on the moment and the present. eg. if you're watching a movie you ask yourself questions about details of what's happening, make comments to yourself, etc. Literally out loud. Same if you're eating a meal. So you train your brain to be present and focused. I think that's the jist of it. Haven't really tried it lol but it sounds logical. The brain is plastic af and can be trained, like a muscle.
Maladaptive daydreaming isn't recognised in psychology/psychiatry, I don't think. So you'll probably get diagnosed with schizophrenia if you see a Doctor about it (I did).