Remove root group membership from NB_USER

I have setup JupyterHub (kubernetes) to use the the dockerstacks image quay.io/jupyter/base-notebook:x86_64-python-3.11 and configured the notebook user to be user1 instead of jovyan.
When I start and open up JupyterLab and run the terminal I can see the user & user id being set correct, and also the group being set. However the gid=0 and the user is a member of the root group.

user1@jupyter-user1:~$ id
uid=1006(user1) gid=0(root) groups=0(root),1006(user1)

How can I set the correct gid and stop user1 being added to the root group?

When I look at the pod description I can see the env variables being set correctly, so I am not sure why NB_GID is not setting the gid.

    Environment:
      HOME:                                    /home/user1
...
      NB_GID:                                  1006
      NB_UID:                                  1006
      NB_USER:                                 user1

I managed to get around the problem by setting the ids directly in the spawner

spawner.fs_gid = 1006
spawner.uid = 1006
spawner.gid = 1006