You missed the big blue Note:
Specific usage of $filter and the $search query parameter is supported only when you use the ConsistencyLevel header set to eventual and $count. For more information, see Advanced query capabilities on Azure AD directory objects.
The following article lists each individual attribute you can use $filter against, as well as the ones that require ConsistencyLevel and $count=true. https://learn.microsoft.com/en-us/graph/aad-advanced-queries
Adding those will result in a working query.