The sense of immersion is closely related to what Coleridge described with the phrase "suspension of disbelief" or "willing suspension of disbelief". We know that the events are not true (or maybe, as in the case of science fiction, fantasy or magical realism, even possible), but we suspend the effect of this knowledge and allow ourselves to react as if they were true.
Something which undoes this effect is often referred to as "breaking suspension of disbelief".
More generally, we may just refer to the reader as being distracted, or simply "a break in audience immersion" particularly with the minor details: If I've been reading a story which for 500 pages has brought me through the machinations of an 18th-Century matriarch set upon finding her daughters good marriages and suddenly a UFO lands in her mansion's grounds, I'm likely to find that brings a total break in suspension of disbelief. If I hit upon a clumsy sentence that is hard to parse that will likely distract me from the story in a different way to suspension of disbelief (it could after all happen with a true story I do believe), though it would certainly not help that suspension.
A deliberate attempt to trigger distraction and force the audience to consider the difference between the fiction and reality is often called alienation, distancing effect, estrangement or the German loan-word verfrumdungseffekt. It might be called Brechtian alienation to distinguish it from other uses of that word.
Estrangement can also refer to the continuing knowledge that e.g. a sci-fi story cannot be literally true, even as it happens in tandem with suspension of disbelief.