Hello @gentleshaid :)
This is a complex question! But, in short, this has highly to do with the functional networks involved in each situation. During REM sleep, the activities of pre-frontal areas and its linked circuits are suspended. Whereas during hallucinations one is still responding to external sensory signals because some areas are still active (e.g planum temporale). I suppose that grossly speaking I could say this is down to the level of consciousness in each case; during sleep is considerably less than in hallucinations.
Thank you for your kind words & for taking the time to stop by ❤