When attempting to invite a user from a different ArcGIS Online organization to a group, searching for the user by entering a name or keyword in the search box does not return any results. The option to uncheck the 'Only search for members in <organization name>' is also disabled, as shown in the image below.
This issue occurs because the group setting limits the membership to only the organization of the group owner. When creating the group, the 'What items in the group can its members update?' option is set to 'All items (group membership is limited to the organization)' in Group Details. For more information about this setting, refer to ArcGIS Online: Create groups: Create a group.
Note: This setting cannot be changed once the group is created.