Python GitLab (2.10.1) Not Returning All Groups

Hi all,
I am using python GitLab 2.10.1 (I have to use this version due to python version). Up until yesterday, we where using this block of code to get all the groups in our project.

list_of_groups = gl.groups.list()
for group in gl.groups.list(iterator=True):
    group_path_to_id[group.full_path] = group.id

This was working fine but (potentially caused by upgrading our GitLab version to v16.4.1-ee from v15.11) stopped working suddenly and is only showing a limited amount of groups.
I tested locally and could see that we receive a different number of groups depending on the version of python GitLab we are using.
See 44 in the latest version vs 20 in the version we have to use.
The only difference in these two screenshots (from a code point of view) is the version of python GitLab.


Managed to find that the number of reponses was being limited when testing in Postman. Resolved by adding the following

for group in gl.groups.list(iterator=True, all=True):