It should be noted that "confused" isn't a game-defined mechanic. It's not a condition like blinded, charmed, deafened, or grappled. As such, being "confused" does absolutely nothing on it's own and doesn't end a grapple.
Therefore, we need to look at the grappled condition and the specific ability of the umber hulk.
The grapple condition ends if:
You release the target whenever you like.
The grappled creature escapes by succeeding on a Strength (Athletics) or Dexterity (Acrobatics) check contested by your Strength (Athletics) check.
The umber hulk's confusing gaze states:
On a failed save, the creature can't take reactions until the start of its next turn and rolls a d8 to determine what it does during that turn. On a 1 to 4, the creature does nothing. On a 5 or 6, the creature takes no action but uses all of its movement to move in a random direction. On a 7 or 8, the creature makes one melee attack against a random creature, or it does nothing if no creature is within reach.
Nothing in the umber hulk's confusing gaze specifically meets the criteria for ending a grapple, therefore, from a strictly mechanical standpoint, it doesn't.
If the DM decides to rule that the character being "confused" causes him to "no longer have a clear understanding of the characters and battlefield" then it's up to the DM to decide whether that ends a grapple.