Continuity mistake: GUN was formed during the events of Sonic the Hedgehog 2. In the Knuckles series, the Buyer stated that GNU had existed long ago, under a different name. However, in the flashback in Sonic 3, the door of the laboratory that Shadow was in has the GUN logo.
Plot hole: Early on in the film, it is established that there are two keys to operate the death ray: the one given to Sonic, which is then stolen by Robotnik, and the one in the gun vault. However, only one key is ever used, and after Robotnik steals the key from Sonic, it is never seen again.
Suggested correction: When they are about to launch the Eclipse Canon, you can actually see that Gerald hands Robotnik both keycards. Robotnik then inserts the first keycard, and the system begins to boot up. There's a shot behind the two, and you see Robotnik doing something and can hear a faint "click," which is presumably him inserting the second keycard. They just didn't bother showing it in close-up because they already showed him inserting the first one. It'd be a bit redundant.
Plot hole: Robotnik and Grandpa Robotnik are dancing through lasers. The suits reflect lasers, but their heads are completely exposed.
Suggested correction: Gerald notes that the lasers are specifically conforming to the shape of his body, and Robotnik explains that the suits were designed to create a field that specifically attracts/distorts the lasers.
The lasers were redirected by the suits towards their heads multiple times.
A couple of times during their dance, the lasers vaguely reflect in the general direction of their heads due to their dance moves, but that doesn't invalidate the correction. The movie provides an adequate explanation for how they are able to get through the hallway; their suits are distorting and redirecting the lasers away from them.