Hi @Dmitry Pirogov ,
First, you can view the properties of these accounts through ADSI edit and compare them with other accounts. Look for showInAddressBook and see if the showInAddressBook property is set. If it is set, clear it and see if these users still appear in the GAL.
In general, we can use "Hide from Exchange Address Lists" to hide these users.
These accounts can be hidden in the GAL. In AD, find the user in the correct OU, open the user's properties, and navigate to the Attribute Editor tab, find the msExchHideFromAddressLists property, check this property and set it to "true".
If none of the above works for you, you can try to reach your goal by configuring the filter.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".