Google sheet query: Shows values ​​from only rows that have a checkbox marked

I have a data table with groups as column headings and names and emails as rows. I want to export data to another spreadsheet in the same document, which will only show the members belonging to a certain group, which will be displayed in separate spreadsheets.

I linked them dynamically using Importrange, filtered data and hid irrelevant groups.

The problem is that if the master data table has any changes (for example, one person was added to group 1), I want them to appear in filtered results for each group without having to update the filtering. Is that possible?

I tried to search everywhere, but nothing was what I needed.