In all versions of GitLab CE/EE since version 13.6, it is possible to see pending invitations of any public group or public project by visiting an API endpoint.
{ "binaries": [ { "binary_version": "8.5.8+dfsg-5", "binary_name": "gitlab" } ] }