I think that the term that you're looking for is continuity error.
According to the Wikipedia:
In fiction, continuity is consistency of the characteristics of
people, plot, objects, and places seen by the reader or viewer over
some period of time.
Most continuity errors are subtle and minor, such as changes in the
level of drink in a character's glass or the length of a cigarette,
and can be permitted with relative indifference even to the final cut.
Others can be more noticeable, such as sudden drastic changes in
appearance of a character. Such errors in continuity can ruin the
illusion of realism and affect suspension of disbelief.
A similar question was answered in our sister site.
@JamesK has pointed the word goof. According to the Wikipedia:
In filmmaking, a goof is a mistake made during film production that
finds its way into the final released picture. Depending upon the film
and the actual scene, the goof may have different effects: a loss in
realism, an annoyance, or it could just be funny. It is often a type
of continuity error. Goofs are also known as "bloopers" or "mistakes".
You can read more about the types of goofs in the linked page.