Religious experiences cannot be distinguished from sheer imagination even for the person having them.
People often have dreams so vivid that they become disoriented when they wake up. The only way to know the difference is that there is a lot more of the real world than there is of the dream world
Of course it goes without saying that people believe in things that are not true all the time. Sometimes people are misinformed. Sometimes they are subject to mental illnesses: psychosis and hallucination. Sometimes mass delusion causes people to believe something for no other reason than the number of people who believe it. It is incredibly easy to manipulate the mind to have experiences ranging from the mundane to the seemingly otherworldly, both through drugs and disorders as well as routine processes like dreaming
So considering how easy it is for your mind to imagine things that even you can't tell are imagined, and given that God never appears except through testimony or an individual's experience, it is impossible to determine that God is the source of an experience