Hello @Marek, Sebastian ,
Thanks for reaching out and apologize for delayed response.
It's not supported to use group-based filtering in a custom configuration as you can only configure group-based filtering the first time that you install Azure AD Connect by using custom installation. It's intended for a pilot deployment where you want only a small set of objects to be synchronized. When you disable group-based filtering, it can't be enabled again.
In a full production deployment, it would be hard to maintain a single group and all of its objects to synchronize. Instead of the filtering-on-groups feature, use one of the methods described in Configure filtering (such as OU or Attribute-based filtering).
To learn more about, refer:
https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-install-custom#sync-filtering-based-on-groups
https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sync-configure-filtering#group-based-filtering
------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.